public inbox for dwz@sourceware.org
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: dwz@sourceware.org, jakub@redhat.com
Subject: [committed] Allow binaries in testsuite sources
Date: Tue, 01 Jan 2019 00:00:00 -0000	[thread overview]
Message-ID: <20190423121703.GA32264@delia> (raw)

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

                 reply	other threads:[~2019-04-23 12:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190423121703.GA32264@delia \
    --to=tdevries@suse.de \
    --cc=dwz@sourceware.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).