0001-skip-the-test-when-gcc-not-deployed.patch 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. From e82a055f85e398cb03a4eaf5faf351a3a1f19344 Mon Sep 17 00:00:00 2001
  2. From: Mingli Yu <Mingli.Yu@windriver.com>
  3. Date: Tue, 21 May 2019 15:20:34 +0800
  4. Subject: [PATCH v2] skip the test when gcc not deployed
  5. Skip the tests which depend on gcc when
  6. gcc not deployed.
  7. Upstream-Status: Submitted[https://sourceware.org/ml/elfutils-devel/2019-q2/msg00091.html]
  8. Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
  9. ---
  10. tests/run-disasm-x86-64.sh | 2 ++
  11. tests/run-disasm-x86.sh | 2 ++
  12. tests/run-strip-g.sh | 2 ++
  13. tests/run-strip-nothing.sh | 2 ++
  14. 4 files changed, 8 insertions(+)
  15. diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh
  16. index a6be62b..c3ef238 100755
  17. --- a/tests/run-disasm-x86-64.sh
  18. +++ b/tests/run-disasm-x86-64.sh
  19. @@ -22,6 +22,8 @@ case "`uname -m`" in
  20. x86_64)
  21. tempfiles testfile45.o
  22. testfiles testfile45.S testfile45.expect
  23. + # skip the case if no gcc deployed
  24. + which gcc || exit 77
  25. gcc -m64 -c -o testfile45.o testfile45.S
  26. testrun_compare ${abs_top_builddir}/src/objdump -d testfile45.o < testfile45.expect
  27. ;;
  28. diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh
  29. index 28a3df7..544fc28 100755
  30. --- a/tests/run-disasm-x86.sh
  31. +++ b/tests/run-disasm-x86.sh
  32. @@ -22,6 +22,8 @@ case "`uname -m`" in
  33. x86_64 | i?86 )
  34. tempfiles testfile44.o
  35. testfiles testfile44.S testfile44.expect
  36. + # skip the case if no gcc deployed
  37. + which gcc || exit 77
  38. gcc -m32 -c -o testfile44.o testfile44.S
  39. testrun_compare ${abs_top_builddir}/src/objdump -d testfile44.o < testfile44.expect
  40. ;;
  41. diff --git a/tests/run-strip-g.sh b/tests/run-strip-g.sh
  42. index 1303819..a943dec 100755
  43. --- a/tests/run-strip-g.sh
  44. +++ b/tests/run-strip-g.sh
  45. @@ -24,6 +24,8 @@
  46. tempfiles a.out strip.out debug.out readelf.out
  47. +# skip the test if gcc deployed
  48. +which gcc || exit 77
  49. echo Create debug a.out.
  50. echo "int main() { return 1; }" | gcc -g -xc -
  51. diff --git a/tests/run-strip-nothing.sh b/tests/run-strip-nothing.sh
  52. index 914fdfb..d03f734 100755
  53. --- a/tests/run-strip-nothing.sh
  54. +++ b/tests/run-strip-nothing.sh
  55. @@ -22,6 +22,8 @@
  56. tempfiles a.out strip.out debug.out
  57. +# skip the case if no gcc deployed
  58. +which gcc || exit 77
  59. # Create no-debug a.out.
  60. echo "int main() { return 1; }" | gcc -s -xc -
  61. --
  62. 2.7.4