* [committed] Remove interpreter directive and set -e from .sh test-cases
@ 2019-01-01 0:00 Tom de Vries
0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2019-01-01 0:00 UTC (permalink / raw)
To: dwz, jakub
Hi,
Currently an x.sh test-case is run in dwz-tests.exp as:
...
exec x.sh
...
so it needs to be marked as executable and starts with:
...
#!/bin/sh
set -e
...
Instead, run the test-case in dwz-tests.exp as:
...
exec sh -e x.sh
...
and remove executable modes on test-cases.
Committed to trunk.
Thanks,
- Tom
Remove interpreter directive and set -e from .sh test-cases
2019-03-15 Tom de Vries <tdevries@suse.de>
* testsuite/dwz.tests/dwz-tests.exp: Run tests with sh -e.
* testsuite/dwz.tests/eu-strip-unstrip-multifile.sh: Remove
"#!/bin/sh" and "set -e". Remove executable mode.
* testsuite/dwz.tests/eu-strip-unstrip.sh: Same.
* testsuite/dwz.tests/hardlink.sh: Same.
* testsuite/dwz.tests/low-mem.sh: Same.
* testsuite/dwz.tests/multifile-name.sh: Same.
* testsuite/dwz.tests/multifile-relative.sh: Same.
* testsuite/dwz.tests/multifile.sh: Same.
* testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh: Same.
* testsuite/dwz.tests/objcopy-strip-debug.sh: Same.
* testsuite/dwz.tests/pr24174.sh: Same.
* testsuite/dwz.tests/regular-o.sh: Same.
* testsuite/dwz.tests/regular.sh: Same.
* testsuite/dwz.tests/too-many-dies.sh: Same.
---
testsuite/dwz.tests/dwz-tests.exp | 2 +-
testsuite/dwz.tests/eu-strip-unstrip-multifile.sh | 4 ----
testsuite/dwz.tests/eu-strip-unstrip.sh | 4 ----
testsuite/dwz.tests/hardlink.sh | 4 ----
testsuite/dwz.tests/low-mem.sh | 4 ----
testsuite/dwz.tests/multifile-name.sh | 4 ----
testsuite/dwz.tests/multifile-relative.sh | 4 ----
testsuite/dwz.tests/multifile.sh | 4 ----
testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh | 4 ----
testsuite/dwz.tests/objcopy-strip-debug.sh | 4 ----
testsuite/dwz.tests/pr24174.sh | 4 ----
testsuite/dwz.tests/regular-o.sh | 4 ----
testsuite/dwz.tests/regular.sh | 4 ----
testsuite/dwz.tests/too-many-dies.sh | 4 ----
14 files changed, 1 insertion(+), 53 deletions(-)
diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index d63f387..f8326dd 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -18,7 +18,7 @@ foreach test $tests {
exec mkdir $dir
cd $dir
- if { [catch { exec ../$test } msg] } {
+ if { [catch { exec sh -e ../$test } msg] } {
puts "$msg"
fail "$test"
} else {
diff --git a/testsuite/dwz.tests/eu-strip-unstrip-multifile.sh b/testsuite/dwz.tests/eu-strip-unstrip-multifile.sh
old mode 100755
new mode 100644
index e489be6..c09d6f5
--- a/testsuite/dwz.tests/eu-strip-unstrip-multifile.sh
+++ b/testsuite/dwz.tests/eu-strip-unstrip-multifile.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
cp ../hello 2
diff --git a/testsuite/dwz.tests/eu-strip-unstrip.sh b/testsuite/dwz.tests/eu-strip-unstrip.sh
old mode 100755
new mode 100644
index db85b79..45220db
--- a/testsuite/dwz.tests/eu-strip-unstrip.sh
+++ b/testsuite/dwz.tests/eu-strip-unstrip.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
eu-strip 1 -o 1.stripped -f 1.debug
diff --git a/testsuite/dwz.tests/hardlink.sh b/testsuite/dwz.tests/hardlink.sh
old mode 100755
new mode 100644
index 6ade00c..b70722c
--- a/testsuite/dwz.tests/hardlink.sh
+++ b/testsuite/dwz.tests/hardlink.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
ln 1 2
diff --git a/testsuite/dwz.tests/low-mem.sh b/testsuite/dwz.tests/low-mem.sh
old mode 100755
new mode 100644
index dfb4118..44be2a9
--- a/testsuite/dwz.tests/low-mem.sh
+++ b/testsuite/dwz.tests/low-mem.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
dwz -l0 1
diff --git a/testsuite/dwz.tests/multifile-name.sh b/testsuite/dwz.tests/multifile-name.sh
old mode 100755
new mode 100644
index 8870ef9..c8381db
--- a/testsuite/dwz.tests/multifile-name.sh
+++ b/testsuite/dwz.tests/multifile-name.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
cp ../hello 2
diff --git a/testsuite/dwz.tests/multifile-relative.sh b/testsuite/dwz.tests/multifile-relative.sh
old mode 100755
new mode 100644
index f7fae82..a34f8b2
--- a/testsuite/dwz.tests/multifile-relative.sh
+++ b/testsuite/dwz.tests/multifile-relative.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
cp ../hello 2
diff --git a/testsuite/dwz.tests/multifile.sh b/testsuite/dwz.tests/multifile.sh
old mode 100755
new mode 100644
index 9ec43cd..9bcbace
--- a/testsuite/dwz.tests/multifile.sh
+++ b/testsuite/dwz.tests/multifile.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
cp ../hello 2
diff --git a/testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh b/testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh
old mode 100755
new mode 100644
index 70c59c8..d5cfa9c
--- a/testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh
+++ b/testsuite/dwz.tests/objcopy-remove-debug-abbrev.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
objcopy --remove-section=.debug_abbrev ../hello 1
cp 1 1.saved
diff --git a/testsuite/dwz.tests/objcopy-strip-debug.sh b/testsuite/dwz.tests/objcopy-strip-debug.sh
old mode 100755
new mode 100644
index 9002964..4f1a51c
--- a/testsuite/dwz.tests/objcopy-strip-debug.sh
+++ b/testsuite/dwz.tests/objcopy-strip-debug.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
objcopy --strip-debug ../hello 1
cp 1 1.saved
diff --git a/testsuite/dwz.tests/pr24174.sh b/testsuite/dwz.tests/pr24174.sh
old mode 100755
new mode 100644
index f6744f4..6543d3b
--- a/testsuite/dwz.tests/pr24174.sh
+++ b/testsuite/dwz.tests/pr24174.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
objcopy --compress-debug-sections 1
if dwz 1 2>dwz.err; status=$?; then
diff --git a/testsuite/dwz.tests/regular-o.sh b/testsuite/dwz.tests/regular-o.sh
old mode 100755
new mode 100644
index 5e5600d..00b6a46
--- a/testsuite/dwz.tests/regular-o.sh
+++ b/testsuite/dwz.tests/regular-o.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
dwz 1 -o 2
diff --git a/testsuite/dwz.tests/regular.sh b/testsuite/dwz.tests/regular.sh
old mode 100755
new mode 100644
index 447b66c..eeab8f7
--- a/testsuite/dwz.tests/regular.sh
+++ b/testsuite/dwz.tests/regular.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
dwz 1
diff --git a/testsuite/dwz.tests/too-many-dies.sh b/testsuite/dwz.tests/too-many-dies.sh
old mode 100755
new mode 100644
index c540e2b..23ecb01
--- a/testsuite/dwz.tests/too-many-dies.sh
+++ b/testsuite/dwz.tests/too-many-dies.sh
@@ -1,7 +1,3 @@
-#!/bin/sh
-
-set -e
-
cp ../hello 1
if dwz -L0 1 2>/dev/null; then exit 1; fi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-03-15 11:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-01 0:00 [committed] Remove interpreter directive and set -e from .sh test-cases Tom de Vries
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).