chiark / gitweb /
test suite: lib-orig-include-exclude Strip block count out of find -ls
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2017 22:12:41 +0000 (22:12 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 8 Jan 2017 22:12:42 +0000 (22:12 +0000)
This is unstable!  I have just seen it vary spontaneously in the
middle of a test run, resulting in this:

 ++ diff -u ../before ../after
 --- ../before   2017-01-08 21:39:48.176033763 +0000
 +++ ../after    2017-01-08 21:39:48.208033833 +0000
 @@ -1,2 +1,2 @@
 -   208380      4 -rw-rw-r--   9 ian      ian           236 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig-docs.tar.gz
 -   208381      4 -rw-rw-r--   8 ian      ian           373 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig.tar.gz
 +   208380      4 -rw-rw-r--  10 ian      ian           236 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig-docs.tar.gz
 +   208381      4 -rw-rw-r--   9 ian      ian           373 Nov  6 20:49 /home/ian/things/Dgit/2dgit/tests/tmp/orig-include-exclude-chkquery/mirror/pool/main/example_1.0.orig.tar.gz
 + test 1 = 0
 + t-report-failure

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
tests/lib-orig-include-exclude

index 30c0bf3..efb9c5b 100644 (file)
@@ -4,6 +4,7 @@ dgit (2.17~) unstable; urgency=medium
   * Internal improvements.
   * badcommit-rewrite: Fix operation using installed version of fixup.
   * Arrange to pass --debug-quick-random to gpg-agent.
+  * Strip block count out of find -ls output - it is unstable!
 
  --
 
index c3b7b43..104cf0b 100644 (file)
@@ -39,7 +39,8 @@ grep orig ../${p}_${v}_*.changes
 test-push-2
 
 origs_findls () {
-       find $tmp/mirror -name '*orig*' -ls
+       find $tmp/mirror -name '*orig*' -ls \
+       | perl -pe 's/^(\s*\d+\s+\d+\s+\S+\s)\s*\d+(\s)/$1$2/'
 }
 
 # check that dgit stripped out the orig update