diff options
| author | Ulf Hermann <[email protected]> | 2017-12-08 10:41:24 +0100 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-12-11 10:14:49 +0000 |
| commit | bae5c54ff46f150ad4ed8f1259599456f235ffd0 (patch) | |
| tree | f11a0597c6ce275a3887a47cf3e658fd8aa0f981 /tests | |
| parent | e61a262eed35c095ac451ee54fa7bf6527764747 (diff) | |
Check native binary format on new tests
run-strip-g.sh and run-strip-nothing.sh compile a file and then strip the
result. This will only work if the compiler produces ELF files.
Change-Id: I739ba0c1be96dca2278a672f5f67a90bc6ce12fa
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'tests')
| -rwxr-xr-x | tests/run-strip-g.sh | 5 | ||||
| -rwxr-xr-x | tests/run-strip-nothing.sh | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh index 13038195..fa2af157 100755 --- a/tests/run-strip-g.sh +++ b/tests/run-strip-g.sh @@ -17,6 +17,11 @@ . $srcdir/test-subr.sh +if ! grep -q -F '#define LIBEXT ".so"' ${abs_top_builddir}/config.h; then + echo "only works with native ELF binaries." + exit 77 +fi + # When stripping just the debug sections/symbols we keep the symtab # in the main ELF file. There should be no symbols pointing into the # debug sections and so there should not be a copy in the debug file diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh index e80bd906..fb85613e 100755 --- a/tests/run-strip-nothing.sh +++ b/tests/run-strip-nothing.sh @@ -17,6 +17,11 @@ . $srcdir/test-subr.sh +if ! grep -q -F '#define LIBEXT ".so"' ${abs_top_builddir}/config.h; then + echo "only works with native ELF binaries." + exit 77 +fi + # If there is nothing to strip then -o output should be identical to input. # And there should not be an (empty) -f debug file. |
