From f4591a35bb530bbee91b62a4a0a2313e1c480faf Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Mon, 14 May 2012 17:37:22 +0000 Subject: tests: update to produce less useless output output is properly sorted, and redundant data is removed also the stratum in stratum-overlap-*.setup are unpacked in a different order, so there is a symlink to stomp first --- tests.as-root/system-overlap.script | 2 +- tests.as-root/system-overlap.stdout | 25 +--------------------- tests/stratum-overlap-keeps-directory-links.script | 4 ++-- tests/stratum-overlap-stomps-file-links.script | 4 ++-- tests/stratum-overlap-stomps-file-links.stdout | 2 +- tests/stratum-overlap-warns.script | 4 +--- tests/stratum-overlap-warns.setup | 6 +++--- tests/stratum-overlap-warns.stdout | 18 ---------------- 8 files changed, 11 insertions(+), 54 deletions(-) diff --git a/tests.as-root/system-overlap.script b/tests.as-root/system-overlap.script index 066f39cf..111b236f 100755 --- a/tests.as-root/system-overlap.script +++ b/tests.as-root/system-overlap.script @@ -119,5 +119,5 @@ git add overlap-*.morph git commit --quiet -m 'Add overlapping chunks' "$SRCDIR/scripts/test-morph" \ - build --verbose --log=$log test:morphs-repo overlap overlap-system.morph + build --log=$log test:morphs-repo overlap overlap-system.morph grep "WARNING\s" $log | sed 's/^.*WARNING/WARNING/' diff --git a/tests.as-root/system-overlap.stdout b/tests.as-root/system-overlap.stdout index c984ab16..e43cb6a5 100644 --- a/tests.as-root/system-overlap.stdout +++ b/tests.as-root/system-overlap.stdout @@ -1,30 +1,7 @@ -Build starts -Building test:morphs-repo overlap overlap-system.morph -Figuring out the right build order -Cloning/updating test:chunk-repo -Cloning/updating test:chunk-repo -Cloning/updating test:kernel-repo -Cloning/updating test:chunk-repo -Cloning/updating test:morphs-repo -Cloning/updating test:morphs-repo -Cloning/updating test:morphs-repo -Building overlap-foo-baz -Building overlap-foobar -Building linux -Building overlap-fooqux -Building foo-baz-stratum -Building foo-barqux-stratum -Building overlap-system WARNING Overlaps in artifact foo-barqux-stratum detected WARNING Artifacts overlap-foobar, overlap-fooqux overlap with files: WARNING bin/foo WARNING Overlaps in artifact overlap-system detected -WARNING Artifacts foo-baz-stratum, foo-barqux-stratum overlap with files: +WARNING Artifacts foo-barqux-stratum, foo-baz-stratum overlap with files: WARNING ./bin/bar WARNING ./bin/foo - chunk.linux - chunk.overlap-foo-baz - chunk.overlap-foobar - chunk.overlap-fooqux - stratum.foo-barqux-stratum - stratum.foo-baz-stratum diff --git a/tests/stratum-overlap-keeps-directory-links.script b/tests/stratum-overlap-keeps-directory-links.script index 96668708..0df4d797 100755 --- a/tests/stratum-overlap-keeps-directory-links.script +++ b/tests/stratum-overlap-keeps-directory-links.script @@ -24,5 +24,5 @@ cache="$DATADIR/cache/artifacts" "$SRCDIR/scripts/test-morph" \ build test:morphs-repo overlap overlap-stratum.morph -(cd "$cache" && for f in *.stratum.overlap-stratum; do tar -tvf "$f"; done | sed 's/^\(\S*\)[^.]*\./\1 /' | - LC_ALL=C sort) | grep '/usr -> /' +(cd "$cache" && for f in *.stratum.overlap-stratum; do tar -tvf "$f"; done | + sed 's/^\(\S*\)[^.]*\./\1 /' | LC_ALL=C sort) | grep '/usr -> /' diff --git a/tests/stratum-overlap-stomps-file-links.script b/tests/stratum-overlap-stomps-file-links.script index 38c4e687..0c76d69c 100755 --- a/tests/stratum-overlap-stomps-file-links.script +++ b/tests/stratum-overlap-stomps-file-links.script @@ -24,5 +24,5 @@ cache="$DATADIR/cache/artifacts" "$SRCDIR/scripts/test-morph" \ build test:morphs-repo overlap overlap-stratum.morph -(cd "$cache" && for f in *.stratum.overlap-stratum; do tar -tvf "$f"; done | sed 's/^\(\S*\)[^.]*\./\1 /' | - LC_ALL=C sort) | grep '\s/bin/foo\s' +(cd "$cache" && for f in *.stratum.overlap-stratum; do tar -tvf "$f"; done | + sed 's/^\(\S*\)[^.]*\./\1 /' | LC_ALL=C sort) | grep -F '/bin/foo' diff --git a/tests/stratum-overlap-stomps-file-links.stdout b/tests/stratum-overlap-stomps-file-links.stdout index d63f9b80..354c74fe 100644 --- a/tests/stratum-overlap-stomps-file-links.stdout +++ b/tests/stratum-overlap-stomps-file-links.stdout @@ -1 +1 @@ --rwxrwxrwx /bin/foo +-rw-r--r-- /bin/foo diff --git a/tests/stratum-overlap-warns.script b/tests/stratum-overlap-warns.script index 4262ae54..edb1d855 100755 --- a/tests/stratum-overlap-warns.script +++ b/tests/stratum-overlap-warns.script @@ -24,7 +24,5 @@ log="$DATADIR/morph.log" cache="$DATADIR/cache/artifacts" "$SRCDIR/scripts/test-morph" \ - build --verbose --log=$log test:morphs-repo overlap overlap-stratum.morph + build --log=$log test:morphs-repo overlap overlap-stratum.morph grep WARNING $log | sed 's/^.*WARNING/WARNING/' -(cd "$cache" && ls *.chunk.* *.stratum.* | sed 's/^[^.]*\./ /' | - LC_ALL=C sort) diff --git a/tests/stratum-overlap-warns.setup b/tests/stratum-overlap-warns.setup index 678b2726..94aed05a 100755 --- a/tests/stratum-overlap-warns.setup +++ b/tests/stratum-overlap-warns.setup @@ -36,17 +36,17 @@ cat <overlap-stratum.morph "ref": "overlap" }, { - "name": "overlap-foo-baz", + "name": "overlap-foobar", "repo": "test:chunk-repo", "ref": "overlap" }, { - "name": "overlap-foobar", + "name": "overlap-fooqux", "repo": "test:chunk-repo", "ref": "overlap" }, { - "name": "overlap-fooqux", + "name": "overlap-foo-baz", "repo": "test:chunk-repo", "ref": "overlap" } diff --git a/tests/stratum-overlap-warns.stdout b/tests/stratum-overlap-warns.stdout index 9ee0e53c..eaddf9c1 100644 --- a/tests/stratum-overlap-warns.stdout +++ b/tests/stratum-overlap-warns.stdout @@ -1,23 +1,5 @@ -Build starts -Building test:morphs-repo overlap overlap-stratum.morph -Figuring out the right build order -Cloning/updating test:chunk-repo -Cloning/updating test:chunk-repo -Cloning/updating test:chunk-repo -Cloning/updating test:chunk-repo -Cloning/updating test:morphs-repo -Building dirs -Building overlap-foo-baz -Building overlap-foobar -Building overlap-fooqux -Building overlap-stratum WARNING Overlaps in artifact overlap-stratum detected WARNING Artifacts overlap-foo-baz, overlap-foobar overlap with files: WARNING bin/bar WARNING Artifacts overlap-foo-baz, overlap-foobar, overlap-fooqux overlap with files: WARNING bin/foo - chunk.dirs - chunk.overlap-foo-baz - chunk.overlap-foobar - chunk.overlap-fooqux - stratum.overlap-stratum -- cgit v1.2.1