Description:
Changed the generated Makefile when performing bisect so that the fixed_compile_flags will be used only if the compiler matches what is in the flit-config.toml file. A better implementation will be warranted when issue #40 is implemented, but this seems adequate for now.
The -nopie vs -no-pie is determined from inside the flit_update.py script instead of logic in the generated Makefile
The trouble flags in bisect are taken based on the type of the compiler, not by matching the name. This implementation seems to work because without specifying the type, it will automatically match the type if that binary is specified in the flit-config.toml file. If you do specify the type, then it will take the flags from the associated compiler in flit-config.toml.
Added TROUBLE_SWITCHES when linking the TROUBLE_TARGET. Maybe we shouldn't...
Added GT_SWITCHES when linking the BISECT_TARGET. Maybe we shouldn't...
Added the following to flitutil.py:
pushd(): used in a with statement that changes to a directory and undoes it at the end of the with block
tempdir(): moved from test_harness.py for creating a temporary directory in a with statement and deleting it at the end of the with block
check_output(): wrapper around subprocess.check_output() that will convert the output from bytes to str
flit_update.py: make assertion errors cause a return of 1 instead of an uncaught exception
Documentation:
Fixed the top-level README.md table of contents
Added a description of the use of fixed_compile_flags and fixed_link_flags into the flit bisect section of the flit-command-line.md documentation file
Tests:
Updated broken tests with this change
Moved fake compilers into tests/shared
Added two new fake compilers: fake_intel19.py and fake_gcc9.py
Added test tests/flit_cli/flit_bisect/tst_bisect_compilerspecificflags.py
Fixes #307
Description: Changed the generated
Makefile
when performing bisect so that thefixed_compile_flags
will be used only if the compiler matches what is in theflit-config.toml
file. A better implementation will be warranted when issue #40 is implemented, but this seems adequate for now.-nopie
vs-no-pie
is determined from inside theflit_update.py
script instead of logic in the generatedMakefile
flit-config.toml
file. If you do specify the type, then it will take the flags from the associated compiler inflit-config.toml
.TROUBLE_SWITCHES
when linking theTROUBLE_TARGET
. Maybe we shouldn't...GT_SWITCHES
when linking theBISECT_TARGET
. Maybe we shouldn't...flitutil.py
:pushd()
: used in awith
statement that changes to a directory and undoes it at the end of thewith
blocktempdir()
: moved fromtest_harness.py
for creating a temporary directory in awith
statement and deleting it at the end of thewith
blockcheck_output()
: wrapper aroundsubprocess.check_output()
that will convert the output frombytes
tostr
flit_update.py
: make assertion errors cause a return of 1 instead of an uncaught exceptionDocumentation:
README.md
table of contentsfixed_compile_flags
andfixed_link_flags
into theflit bisect
section of theflit-command-line.md
documentation fileTests:
tests/shared
fake_intel19.py
andfake_gcc9.py
tests/flit_cli/flit_bisect/tst_bisect_compilerspecificflags.py