From b8fdc166a58198ea1872bddb9163a1039668c9b8 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sun, 8 Jan 2017 22:12:41 +0000 Subject: test suite: lib-orig-include-exclude Strip block count out of find -ls 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 --- tests/lib-orig-include-exclude | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests/lib-orig-include-exclude') diff --git a/tests/lib-orig-include-exclude b/tests/lib-orig-include-exclude index c3b7b43..104cf0b 100644 --- a/tests/lib-orig-include-exclude +++ b/tests/lib-orig-include-exclude @@ -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 -- cgit v1.2.3