[devscripts] 03/03: Test excluding deply recursive directory trees
Joachim Breitner
nomeata at moszumanska.debian.org
Fri Mar 21 10:18:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
nomeata pushed a commit to branch master
in repository devscripts.
commit d48ce79e5e76da7f86b36245cf91d2f97c710879
Author: Joachim Breitner <nomeata at debian.org>
Date: Thu Mar 20 00:13:55 2014 +0100
Test excluding deply recursive directory trees
Unfortunately "zip -r foo.zip somedir" will not remove "somedir/file"
from the zipfile :-(
---
test/test_uscan | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/test/test_uscan b/test/test_uscan
index 7141e58..e5ac8bf 100755
--- a/test/test_uscan
+++ b/test/test_uscan
@@ -185,13 +185,15 @@ END
mkdir -p "$TMPDIR/repo/; echo baz; #/"
mkdir -p $TMPDIR/repo/exclude-dir
touch $TMPDIR/repo/exclude-dir/file
+ mkdir -p $TMPDIR/repo/exclude-dir/subdir
+ touch $TMPDIR/repo/exclude-dir/subdir/file2
( cd $TMPDIR/repo ;
tar cfz $PKG-1.tar.gz * ;
python -m SimpleHTTPServer $PORT &
echo $! > pid )
- OUTPUT=$( (cd $TMPDIR/$PKG ; $COMMAND) | grep baz)
+ (cd $TMPDIR/$PKG ; $COMMAND)
TARBALL=${PKG}_1+dfsg.orig.tar.gz
assertTrue 'pristine tarball is not created' "[ -f $TMPDIR/$TARBALL ]"
@@ -204,10 +206,10 @@ END
$(containsName "$CONTENTS" exclude-this)
assertFalse "dir that must be excluded is present in the tarball" \
$(containsName "$CONTENTS" exclude-dir)
+ assertFalse "subdir that must be excluded is present in the tarball" \
+ $(containsName "$CONTENTS" subdir)
assertFalse "path with whitespace that must be excluded is present" \
$(containsName "$CONTENTS" "; echo baz; #/")
- # 731849
- assertNull 'dirty root directory allowed command execution' "$OUTPUT"
cleanup
@@ -252,6 +254,9 @@ END
mkdir -p "$TMPDIR/repo/; echo baz; #/"
mkdir -p $TMPDIR/repo/exclude-dir
touch $TMPDIR/repo/exclude-dir/file
+ # doesn't work yet
+ # mkdir -p $TMPDIR/repo/exclude-dir/subdir
+ # touch $TMPDIR/repo/exclude-dir/subdir/file2
( cd $TMPDIR/repo ;
zip -r $PKG-1.zip * ;
@@ -268,6 +273,8 @@ END
$(containsName "$CONTENTS" exclude-this)
assertFalse "dir that must be excluded is present in the zip file" \
$(containsName "$CONTENTS" exclude-dir)
+ assertFalse "subdir that must be excluded is present in the zip file" \
+ $(containsName "$CONTENTS" subdir)
assertFalse "path with whitespace that must be excluded is present" \
$(containsName "$CONTENTS" "; echo baz; #/")
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list