From: Joel Rosdahl Date: Tue, 4 Aug 2020 19:09:59 +0000 (+0200) Subject: Improve Clang modules test suite X-Git-Tag: v4.0~219 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b88fc862663495e8b8a1038d628e44d6b280bd8e;p=thirdparty%2Fccache.git Improve Clang modules test suite - Backdate modified header so that the test actually tests content and not bails out early due to too new header timestamp. - Verify that modifications to module.modulemap are detected, which is key to how the modules support works. --- diff --git a/test/suites/modules.bash b/test/suites/modules.bash index 35dc04c24..664d80600 100644 --- a/test/suites/modules.bash +++ b/test/suites/modules.bash @@ -70,7 +70,14 @@ SUITE_modules() { #include void f(); EOF + backdate test1.h CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS modules" $CCACHE_COMPILE -MD -fmodules -fcxx-modules -c test1.cpp -MD expect_stat 'cache miss' 2 + + echo >>module.modulemap + backdate test1.h + + CCACHE_SLOPPINESS="$DEFAULT_SLOPPINESS modules" $CCACHE_COMPILE -MD -fmodules -fcxx-modules -c test1.cpp -MD + expect_stat 'cache miss' 3 }