From: Joel Rosdahl Date: Mon, 23 Sep 2013 12:42:40 +0000 (+0200) Subject: Fix --dump-manifest test instability in newer GCC versions X-Git-Tag: v3.2~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31eda0672dbe97ac48aacd517a4be2555755bd42;p=thirdparty%2Fccache.git Fix --dump-manifest test instability in newer GCC versions --- diff --git a/test.sh b/test.sh index f5a10d08e..5e042b4db 100755 --- a/test.sh +++ b/test.sh @@ -1367,83 +1367,12 @@ EOF $CCACHE -Cz >/dev/null $CCACHE $COMPILER test.c -c -o test.o manifest=`find $CCACHE_DIR -name '*.manifest'` - $CCACHE --dump-manifest $manifest | - perl -ape 's/:.*/: normalized/ if ($F[0] =~ "(Mtime|Ctime):") or ($F[0] =~ "(Hash|Size):" and ++$n > 6)' \ - >manifest.dump - if [ $COMPILER_TYPE_CLANG -eq 1 ]; then - cat <expected.dump -Magic: cCmF -Version: 1 -Hash size: 16 -Reserved field: 0 -File paths (3): - 0: ./test3.h - 1: ./test1.h - 2: ./test2.h -File infos (3): - 0: - Path index: 0 - Hash: c2f5392dbc7e8ff6138d01608445240a - Size: 24 - Mtime: normalized - Ctime: normalized - 1: - Path index: 1 - Hash: e6b009695d072974f2c4d1dd7e7ed4fc - Size: 95 - Mtime: normalized - Ctime: normalized - 2: - Path index: 2 - Hash: e94ceb9f1b196c387d098a5f1f4fe862 - Size: 11 - Mtime: normalized - Ctime: normalized -Results (1): - 0: - File hash indexes: 0 1 2 - Hash: normalized - Size: normalized -EOF - else - cat <expected.dump -Magic: cCmF -Version: 1 -Hash size: 16 -Reserved field: 0 -File paths (3): - 0: test2.h - 1: test3.h - 2: test1.h -File infos (3): - 0: - Path index: 0 - Hash: e94ceb9f1b196c387d098a5f1f4fe862 - Size: 11 - Mtime: normalized - Ctime: normalized - 1: - Path index: 1 - Hash: c2f5392dbc7e8ff6138d01608445240a - Size: 24 - Mtime: normalized - Ctime: normalized - 2: - Path index: 2 - Hash: e6b009695d072974f2c4d1dd7e7ed4fc - Size: 95 - Mtime: normalized - Ctime: normalized -Results (1): - 0: - File hash indexes: 0 1 2 - Hash: normalized - Size: normalized -EOF - fi + $CCACHE --dump-manifest $manifest >manifest.dump - if diff expected.dump manifest.dump; then - : + if grep 'Hash: e6b009695d072974f2c4d1dd7e7ed4fc' manifest.dump >/dev/null 2>&1 && \ + grep 'Hash: e94ceb9f1b196c387d098a5f1f4fe862' manifest.dump >/dev/null 2>&1 && \ + grep 'Hash: c2f5392dbc7e8ff6138d01608445240a' manifest.dump >/dev/null 2>&1; then + : OK else test_failed "unexpected output of --dump-manifest" fi