From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 73225 invoked by alias); 23 Apr 2019 12:17:11 -0000 Mailing-List: contact dwz-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Post: List-Help: List-Subscribe: Sender: dwz-owner@sourceware.org Received: (qmail 73215 invoked by uid 89); 23 Apr 2019 12:17:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.100.3 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy= X-Spam-Status: No, score=-25.5 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on sourceware.org X-Spam-Level: X-HELO: mx1.suse.de X-Virus-Scanned: by amavisd-new at test-mx.suse.de Date: Tue, 01 Jan 2019 00:00:00 -0000 From: Tom de Vries To: dwz@sourceware.org, jakub@redhat.com Subject: [committed] Allow binaries in testsuite sources Message-ID: <20190423121703.GA32264@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-SW-Source: 2019-q2/txt/msg00033.txt.bz2 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 * 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