blob: 096361e2150a9ec090e3b1ee009fb5217852a1eb [file] [log] [blame]
Patrick Williamsb58112e2024-03-07 11:16:36 -06001From f9ab54454000fd210dbaa92cf516084d05060f9d Mon Sep 17 00:00:00 2001
Brad Bishopc342db32019-05-15 21:57:59 -04002From: Mingli Yu <Mingli.Yu@windriver.com>
Brad Bishop15ae2502019-06-18 21:44:24 -04003Date: Tue, 21 May 2019 15:20:34 +0800
Andrew Geissler90fd73c2021-03-05 15:25:55 -06004Subject: [PATCH] skip the test when gcc not deployed
Brad Bishopc342db32019-05-15 21:57:59 -04005
6Skip the tests which depend on gcc when
7gcc not deployed.
8
Andrew Geissler595f6302022-01-24 19:11:47 +00009Upstream-Status: Submitted [https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html]
Brad Bishopc342db32019-05-15 21:57:59 -040010
11Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
12---
Brad Bishop15ae2502019-06-18 21:44:24 -040013 tests/run-disasm-x86-64.sh | 2 ++
14 tests/run-disasm-x86.sh | 2 ++
Brad Bishopc342db32019-05-15 21:57:59 -040015 tests/run-strip-g.sh | 2 ++
16 tests/run-strip-nothing.sh | 2 ++
Brad Bishop15ae2502019-06-18 21:44:24 -040017 4 files changed, 8 insertions(+)
Brad Bishopc342db32019-05-15 21:57:59 -040018
Brad Bishop15ae2502019-06-18 21:44:24 -040019diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
Andrew Geissler90fd73c2021-03-05 15:25:55 -060020index 07b612b..7a32996 100755
Brad Bishop15ae2502019-06-18 21:44:24 -040021--- 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
Andrew Geissler90fd73c2021-03-05 15:25:55 -060029 ${CC} -m64 -c -o testfile45.o testfile45.S
Brad Bishop15ae2502019-06-18 21:44:24 -040030 testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
31 ;;
32diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
Andrew Geissler90fd73c2021-03-05 15:25:55 -060033index 7ac73ad..f0d4796 100755
Brad Bishop15ae2502019-06-18 21:44:24 -040034--- 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
Andrew Geissler90fd73c2021-03-05 15:25:55 -060042 ${CC} -m32 -c -o testfile44.o testfile44.S
Brad Bishop15ae2502019-06-18 21:44:24 -040043 testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
44 ;;
Brad Bishopc342db32019-05-15 21:57:59 -040045diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
Andrew Geissler90fd73c2021-03-05 15:25:55 -060046index 1592121..9b8157e 100755
Brad Bishopc342db32019-05-15 21:57:59 -040047--- 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.
Andrew Geissler90fd73c2021-03-05 15:25:55 -060056 echo "int main() { return 1; }" | ${CC} -g -xc -
Brad Bishopc342db32019-05-15 21:57:59 -040057
58diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh
Andrew Geissler90fd73c2021-03-05 15:25:55 -060059index 710c200..3a81d8e 100755
Brad Bishopc342db32019-05-15 21:57:59 -040060--- 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.
Andrew Geissler90fd73c2021-03-05 15:25:55 -060069 echo "int main() { return 1; }" | ${CC} -s -xc -
Brad Bishopc342db32019-05-15 21:57:59 -040070