While running a command from the integration tests, invoke `.result` to
trigger a save of the result set, but don't call `.format!` to avoid
(re)generating the HTML output with every run. The final output will
still be written once the main unit test run completes.
This significantly speeds up the integration tests, that take about 1/3
less time to complete when not generating the intermediate output.
ClosesHomebrew/homebrew#48280.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Commands executed during integration testing are executed in a separate
process and thus generate a new result set for each command. To avoid
that these results override each other, they need to have a unique
`command_name`. Derive this name from the test class/name and the index
of the command inside that test, resulting in identifiers like
`IntegrationCommandTests#test_prefix.1 brew --prefix`.
Also replaces `TEST_TMPDIR` in the arguments with `"@TMPDIR@"` to get a
cleaner command identifier that is independent of the temporary
directory that changes with every run.
The filter for `vendor/bundle/` is useless because this directory is
located in `Homebrew/test/` and that one is already filtered. Moreover,
SimpleCov already loads the `bundler_filter` profile (that installs
basically the same filter) in its default configuration.
Xcode can only provide autotools if it is installed, thus check that
first. Skipping this check will try to compare a `nil` Xcode version to
4.3, the first version of Xcode to not provide autotools.
FixesHomebrew/homebrew#48208.
ClosesHomebrew/homebrew#48278.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
Tests shouldn't fail in case of an unavailable network or a deliberately
disabled access to the GitHub API.
ClosesHomebrew/homebrew#47670.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
This tests all possible combinations of alpha, beta, RC, regular, and
patch versions. Also improves code coverage and partitions the version
comparison tests into more uniform chunks.
ClosesHomebrew/homebrew#47669.
Signed-off-by: Martin Afanasjew <martin@afanasjew.de>
If the test fails above `formula_file`’s definition this line fails
because `formula_file` is `nil`.
ClosesHomebrew/homebrew#47663.
Signed-off-by: Baptiste Fontaine <batifon@yahoo.fr>
This test wasn't running by default, so we missed that it wasn't
actually being executed - or that it was failing when running in the
testing environment.
As far as I can tell this is not, and has not, been used either in core
or in any tap, third party or otherwise, so just remove the feature and
its test.