Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 1 | From e82a055f85e398cb03a4eaf5faf351a3a1f19344 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 |
| 4 | Subject: [PATCH v2] 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> |
| 12 | --- |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 13 | tests/run-disasm-x86-64.sh | 2 ++ |
| 14 | tests/run-disasm-x86.sh | 2 ++ |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 15 | tests/run-strip-g.sh | 2 ++ |
| 16 | tests/run-strip-nothing.sh | 2 ++ |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 17 | 4 files changed, 8 insertions(+) |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 18 | |
Brad Bishop | 15ae250 | 2019-06-18 21:44:24 -0400 | [diff] [blame^] | 19 | diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh |
| 20 | index a6be62b..c3ef238 100755 |
| 21 | --- a/tests/run-disasm-x86-64.sh |
| 22 | +++ b/tests/run-disasm-x86-64.sh |
| 23 | @@ -22,6 +22,8 @@ case "`uname -m`" in |
| 24 | x86_64) |
| 25 | tempfiles testfile45.o |
| 26 | testfiles testfile45.S testfile45.expect |
| 27 | + # skip the case if no gcc deployed |
| 28 | + which gcc || exit 77 |
| 29 | gcc -m64 -c -o testfile45.o testfile45.S |
| 30 | testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect |
| 31 | ;; |
| 32 | diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh |
| 33 | index 28a3df7..544fc28 100755 |
| 34 | --- a/tests/run-disasm-x86.sh |
| 35 | +++ b/tests/run-disasm-x86.sh |
| 36 | @@ -22,6 +22,8 @@ case "`uname -m`" in |
| 37 | x86_64 | i?86 ) |
| 38 | tempfiles testfile44.o |
| 39 | testfiles testfile44.S testfile44.expect |
| 40 | + # skip the case if no gcc deployed |
| 41 | + which gcc || exit 77 |
| 42 | gcc -m32 -c -o testfile44.o testfile44.S |
| 43 | testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect |
| 44 | ;; |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 45 | diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh |
| 46 | index 1303819..a943dec 100755 |
| 47 | --- a/tests/run-strip-g.sh |
| 48 | +++ b/tests/run-strip-g.sh |
| 49 | @@ -24,6 +24,8 @@ |
| 50 | |
| 51 | tempfiles a.out strip.out debug.out readelf.out |
| 52 | |
| 53 | +# skip the test if gcc deployed |
| 54 | +which gcc || exit 77 |
| 55 | echo Create debug a.out. |
| 56 | echo "int main() { return 1; }" | gcc -g -xc - |
| 57 | |
| 58 | diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh |
| 59 | index 914fdfb..d03f734 100755 |
| 60 | --- a/tests/run-strip-nothing.sh |
| 61 | +++ b/tests/run-strip-nothing.sh |
| 62 | @@ -22,6 +22,8 @@ |
| 63 | |
| 64 | tempfiles a.out strip.out debug.out |
| 65 | |
| 66 | +# skip the case if no gcc deployed |
| 67 | +which gcc || exit 77 |
| 68 | # Create no-debug a.out. |
| 69 | echo "int main() { return 1; }" | gcc -s -xc - |
| 70 | |
| 71 | -- |
| 72 | 2.7.4 |
| 73 | |