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.
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>
A formula should be built from source by default if the --cc option is
passed to specify a particular compiler.
Added a test to test_formula_installer: test_not_poured_from_bottle_when_compiler_specified
Modified test_formula_installer to assert that the formula was not poured
from a bottle. Similarly modified test_formula_installer_bottle to assert
that the formula *was* installed from a bottle.
Added an install method to the TestballBottle formula (the same as the
Testball formula's install method) so that the TestballBottle formula can
be "built from source".
FixesHomebrew/homebrew#46046 - Build from source should be the default behavior if --cc
option is passed
ClosesHomebrew/homebrew#46162.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>