diff options
author | Anders Björklund <anders@itension.se> | 2015-10-24 16:41:33 +0200 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2015-12-19 15:57:58 +0100 |
commit | 219783844c63d37c26f771c1471f3fe2943f9a88 (patch) | |
tree | f4814ac6c7e926344fe6811d4c47d14fc2dbac6e /test | |
parent | a0db899220bd9aa80c36602988306da5688f0637 (diff) | |
download | ccache-219783844c63d37c26f771c1471f3fe2943f9a88.tar.gz |
Allow not including system headers in manifest
If CCACHE_SLOPPINESS includes "no_system_headers", ccache will not add any
system headers to the manifest's list of include files to always check.
This allows ccache to only check non-system headers, but will also cause
it to return stale cache hits if such system headers have been changed.
Diffstat (limited to 'test')
-rw-r--r-- | test/test_conf.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/test_conf.c b/test/test_conf.c index df344c55..4c6f2521 100644 --- a/test/test_conf.c +++ b/test/test_conf.c @@ -116,7 +116,7 @@ TEST(conf_read_valid_config) "read_only_direct = true\n" "recache = true\n" "run_second_cpp = true\n" - "sloppiness = file_macro ,time_macros, include_file_mtime,include_file_ctime,file_stat_matches pch_defines \n" + "sloppiness = file_macro ,time_macros, include_file_mtime,include_file_ctime,file_stat_matches,no_system_headers pch_defines \n" "stats = false\n" "temporary_dir = ${USER}_foo\n" "umask = 777\n" @@ -148,7 +148,8 @@ TEST(conf_read_valid_config) CHECK(conf->run_second_cpp); CHECK_INT_EQ(SLOPPY_INCLUDE_FILE_MTIME|SLOPPY_INCLUDE_FILE_CTIME| SLOPPY_FILE_MACRO|SLOPPY_TIME_MACROS| - SLOPPY_FILE_STAT_MATCHES|SLOPPY_PCH_DEFINES, + SLOPPY_FILE_STAT_MATCHES|SLOPPY_NO_SYSTEM_HEADERS| + SLOPPY_PCH_DEFINES, conf->sloppiness); CHECK(!conf->stats); CHECK_STR_EQ_FREE1(format("%s_foo", user), conf->temporary_dir); @@ -369,7 +370,7 @@ TEST(conf_print_items) true, SLOPPY_FILE_MACRO|SLOPPY_INCLUDE_FILE_MTIME| SLOPPY_INCLUDE_FILE_CTIME|SLOPPY_TIME_MACROS| - SLOPPY_FILE_STAT_MATCHES, + SLOPPY_FILE_STAT_MATCHES|SLOPPY_NO_SYSTEM_HEADERS, false, "td", 022, @@ -408,7 +409,8 @@ TEST(conf_print_items) CHECK_STR_EQ("recache = true", received_conf_items[n++].descr); CHECK_STR_EQ("run_second_cpp = true", received_conf_items[n++].descr); CHECK_STR_EQ("sloppiness = file_macro, include_file_mtime," - " include_file_ctime, time_macros, file_stat_matches", + " include_file_ctime, time_macros," + " file_stat_matches, no_system_headers", received_conf_items[n++].descr); CHECK_STR_EQ("stats = false", received_conf_items[n++].descr); CHECK_STR_EQ("temporary_dir = td", received_conf_items[n++].descr); |