outputs.exp: skip @file -save-temps if target has -L or -I
The outputs.exp tests check what temporary files are created
and left behind with e.g. -save-temps.
Additional files are created in presence of @file option.
Adding an -I or -L option causes *another* temporary file to
appear. I take it that's deliberate, as there are tests for
that behavior.
For native testing, the default test-framework baseboard
file unix.exp doesn't add any -I or -L options and all tests
pass. For a newlib target however, you'll have a couple of
-L options (see the nopts handling in outputs.exp), leading
to:
Running /x/gcc/gcc/testsuite/gcc.misc-tests/outputs.exp ...
FAIL: outputs exe savetmp namedb: extra
outputs.args.1
FAIL: outputs exe savetmp named2: extra
outputs.args.1
FAIL: outputs exe savetmp named2: extra
outputs.args.3
FAIL: outputs lto sing unnamed: extra
a.args.1
The failing tests are among the actual tests that check the
behavior of @file, and are confused by the additional -L.
Identify presence of -I or -L from the test framework and
skip those tests.
Tested cris-elf and x86_64-pc-linux-gnu.
gcc/testsuite:
* gcc.misc-tests/outputs.exp: Skip @file -save-temps
tests if target test-framework has -L or -I options.