* [committed] Allow binaries in testsuite sources
@ 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,
Add a script xunzip-dir.sh that is called from dwz-tests.exp to unzip the
zipped execs in testsuite directory testsuite/dwz.tests/execs.xz into build
dir $pwd/testsuite/dwz.tests/execs.
Committed to trunk.
Thanks,
- Tom
Allow binaries in testsuite sources
2019-04-23 Tom de Vries <tdevries@suse.de>
* testsuite/scripts/xunzip-dir.sh: New test.
* testsuite/dwz.tests/dwz-tests.exp: Call xunzip-dir.sh.
---
testsuite/dwz.tests/dwz-tests.exp | 5 +++++
testsuite/scripts/xunzip-dir.sh | 20 ++++++++++++++++++++
2 files changed, 25 insertions(+)
diff --git a/testsuite/dwz.tests/dwz-tests.exp b/testsuite/dwz.tests/dwz-tests.exp
index a20002f..1e6bd0f 100644
--- a/testsuite/dwz.tests/dwz-tests.exp
+++ b/testsuite/dwz.tests/dwz-tests.exp
@@ -5,6 +5,11 @@ set pwd [pwd]
set env(PATH) $srcdir/scripts:$::env(PATH)
set env(execs) $pwd
+exec mkdir -p $pwd/testsuite/dwz.tests/execs
+exec $srcdir/scripts/xunzip-dir.sh \
+ $srcdir/dwz.tests/execs.xz \
+ $pwd/testsuite/dwz.tests/execs
+
foreach test $tests {
global runtests
diff --git a/testsuite/scripts/xunzip-dir.sh b/testsuite/scripts/xunzip-dir.sh
new file mode 100755
index 0000000..624d525
--- /dev/null
+++ b/testsuite/scripts/xunzip-dir.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+src="$1"
+dst="$2"
+
+if [ ! -d $src ]; then
+ exit 0
+fi
+
+files=$(cd $src; find -name "*.xz")
+
+for f in $files; do
+ df=$(echo $f \
+ | sed 's/\.xz$//')
+ if [ -f $dst/$df ]; then
+ continue
+ fi
+ cp $src/$f $dst/$f
+ xz -d $dst/$f
+done
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-04-23 12:17 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] Allow binaries in testsuite sources 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).