diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-14 12:50:56 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2012-06-14 12:50:56 +0000 |
commit | 9101b1839abe305545f487b10939b498e1c09280 (patch) | |
tree | 3dc554d7a6727c056c8c00213b14b979e3c13450 /tests | |
parent | 34b5ccb6bf00e0b6fa67e75eb749a32dd9fed277 (diff) | |
download | morph-9101b1839abe305545f487b10939b498e1c09280.tar.gz |
stratum-overlap-warns: make test more loose
the exact format of the logging may change, so just check that the
artifact, the chunks and the files are mentioned
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/stratum-overlap-warns.script | 12 | ||||
-rw-r--r-- | tests/stratum-overlap-warns.stdout | 5 |
2 files changed, 11 insertions, 6 deletions
diff --git a/tests/stratum-overlap-warns.script b/tests/stratum-overlap-warns.script index edb1d855..2e9965fe 100755 --- a/tests/stratum-overlap-warns.script +++ b/tests/stratum-overlap-warns.script @@ -21,8 +21,18 @@ set -eu log="$DATADIR/morph.log" +warnings="$DATADIR/warnings" cache="$DATADIR/cache/artifacts" +warning_mentions(){ + grep -F "$1" <"$warnings" >/dev/null 2>/dev/null +} + "$SRCDIR/scripts/test-morph" \ build --log=$log test:morphs-repo overlap overlap-stratum.morph -grep WARNING $log | sed 's/^.*WARNING/WARNING/' +grep WARNING "$log" >"$warnings" +for str in overlap-stratum \ + overlap-foo-baz overlap-foobar bin/bar \ + overlap-fooqux bin/foo; do + warning_mentions 'overlap-stratum' || exit $? +done diff --git a/tests/stratum-overlap-warns.stdout b/tests/stratum-overlap-warns.stdout deleted file mode 100644 index eaddf9c1..00000000 --- a/tests/stratum-overlap-warns.stdout +++ /dev/null @@ -1,5 +0,0 @@ -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 |