Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 1 | From 2fa52d61b1abdf4a3f3b153c771fb2081666430c Mon Sep 17 00:00:00 2001 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 2 | From: Mingli Yu <Mingli.Yu@windriver.com> |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 3 | Date: Tue, 21 May 2019 15:20:34 +0800 |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 4 | Subject: [PATCH] skip the test when gcc not deployed |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 5 | |
| 6 | Skip the tests which depend on gcc when |
| 7 | gcc not deployed. |
| 8 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 9 | Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html] |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 10 | |
| 11 | Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 12 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 13 | --- |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 14 | tests/run-disasm-x86-64.sh | 2 ++ |
| 15 | tests/run-disasm-x86.sh | 2 ++ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 16 | tests/run-strip-g.sh | 2 ++ |
| 17 | tests/run-strip-nothing.sh | 2 ++ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 18 | 4 files changed, 8 insertions(+) |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 19 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 20 | diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 21 | index 07b612b..7a32996 100755 |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 22 | --- a/tests/run-disasm-x86-64.sh |
| 23 | +++ b/tests/run-disasm-x86-64.sh |
| 24 | @@ -22,6 +22,8 @@ case "`uname -m`" in |
| 25 | x86_64) |
| 26 | tempfiles testfile45.o |
| 27 | testfiles testfile45.S testfile45.expect |
| 28 | + # skip the case if no gcc deployed |
| 29 | + which gcc || exit 77 |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 30 | ${CC} -m64 -c -o testfile45.o testfile45.S |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 31 | testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect |
| 32 | ;; |
| 33 | diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 34 | index 7ac73ad..f0d4796 100755 |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 35 | --- a/tests/run-disasm-x86.sh |
| 36 | +++ b/tests/run-disasm-x86.sh |
| 37 | @@ -22,6 +22,8 @@ case "`uname -m`" in |
| 38 | x86_64 | i?86 ) |
| 39 | tempfiles testfile44.o |
| 40 | testfiles testfile44.S testfile44.expect |
| 41 | + # skip the case if no gcc deployed |
| 42 | + which gcc || exit 77 |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 43 | ${CC} -m32 -c -o testfile44.o testfile44.S |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame] | 44 | testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect |
| 45 | ;; |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 46 | diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 47 | index 1592121..9b8157e 100755 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 48 | --- a/tests/run-strip-g.sh |
| 49 | +++ b/tests/run-strip-g.sh |
| 50 | @@ -24,6 +24,8 @@ |
| 51 | |
| 52 | tempfiles a.out strip.out debug.out readelf.out |
| 53 | |
| 54 | +# skip the test if gcc deployed |
| 55 | +which gcc || exit 77 |
| 56 | echo Create debug a.out. |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 57 | echo "int main() { return 1; }" | ${CC} -g -xc - |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 58 | |
| 59 | diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 60 | index 710c200..3a81d8e 100755 |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 61 | --- a/tests/run-strip-nothing.sh |
| 62 | +++ b/tests/run-strip-nothing.sh |
| 63 | @@ -22,6 +22,8 @@ |
| 64 | |
| 65 | tempfiles a.out strip.out debug.out |
| 66 | |
| 67 | +# skip the case if no gcc deployed |
| 68 | +which gcc || exit 77 |
| 69 | # Create no-debug a.out. |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 70 | echo "int main() { return 1; }" | ${CC} -s -xc - |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 71 | |