From: Joel Rosdahl Date: Wed, 28 Sep 2016 20:49:16 +0000 (+0200) Subject: Improve regression test for -Wp, with multiple arguments X-Git-Tag: v3.3.3~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e77359b432e1971ec7ad393e21a7f8d55eedb3f5;p=thirdparty%2Fccache.git Improve regression test for -Wp, with multiple arguments --- diff --git a/test.sh b/test.sh index 9c7314ea0..3e0415745 100755 --- a/test.sh +++ b/test.sh @@ -1614,15 +1614,19 @@ EOF # ccache could try to parse and make sense of -Wp, with multiple arguments, # but it currently doesn't, so we have to disable direct mode. - $CCACHE_COMPILE -c -Wp,-DFOO,-DGOO test.c 2>/dev/null + touch source.c + + $CCACHE_COMPILE -c -Wp,-MMD,source.d,-MT,source.o source.c 2>/dev/null expect_stat 'cache hit (direct)' 0 expect_stat 'cache hit (preprocessed)' 0 expect_stat 'cache miss' 1 + expect_file_content source.d "source.o: source.c" - $CCACHE_COMPILE -c -Wp,-DFOO,-DGOO test.c 2>/dev/null + $CCACHE_COMPILE -c -Wp,-MMD,source.d,-MT,source.o source.c 2>/dev/null expect_stat 'cache hit (direct)' 0 expect_stat 'cache hit (preprocessed)' 1 expect_stat 'cache miss' 1 + expect_file_content source.d "source.o: source.c" # ------------------------------------------------------------------------- TEST "-MMD for different source files"