diff options
author | Anders Björklund <anders@itension.se> | 2015-11-13 21:08:02 +0100 |
---|---|---|
committer | Joel Rosdahl <joel@rosdahl.net> | 2015-12-22 19:57:28 +0100 |
commit | 316cdda7572501e4fcef09155de82f6e9ddf6786 (patch) | |
tree | d7ba33b3b689365f0b4215daaacc15f210ee7564 /test | |
parent | b0f4e626137c78a60498fd3236bca89f02545157 (diff) | |
download | ccache-316cdda7572501e4fcef09155de82f6e9ddf6786.tar.gz |
Add feature to ignore headers in manifest
Certain headers are never changed, or perhaps not so important (timestamps).
Avoid repeatedly hashing these in the manifest, to make direct mode faster.
One can either use the full path to the include file, or perhaps a directory
of headers to ignore all the headers under that directory (e.g. compiler)
Diffstat (limited to 'test')
-rw-r--r-- | test/test_conf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test_conf.c b/test/test_conf.c index 4c6f2521..01cdfd84 100644 --- a/test/test_conf.c +++ b/test/test_conf.c @@ -20,7 +20,7 @@ #include "test/framework.h" #include "test/util.h" -#define N_CONFIG_ITEMS 27 +#define N_CONFIG_ITEMS 28 static struct { char *descr; const char *origin; @@ -64,6 +64,7 @@ TEST(conf_create) CHECK_STR_EQ("", conf->extra_files_to_hash); CHECK(!conf->hard_link); CHECK(!conf->hash_dir); + CHECK_STR_EQ("", conf->ignore_headers_in_manifest); CHECK_STR_EQ("", conf->log_file); CHECK_INT_EQ(0, conf->max_files); CHECK_INT_EQ((uint64_t)5 * 1000 * 1000 * 1000, conf->max_size); @@ -107,6 +108,7 @@ TEST(conf_read_valid_config) "extra_files_to_hash = a:b c:$USER\n" "hard_link = true\n" "hash_dir = true\n" + "ignore_headers_in_manifest = a:b/c\n" "log_file = $USER${USER} \n" "max_files = 17\n" "max_size = 123M\n" @@ -137,6 +139,7 @@ TEST(conf_read_valid_config) CHECK_STR_EQ_FREE1(format("a:b c:%s", user), conf->extra_files_to_hash); CHECK(conf->hard_link); CHECK(conf->hash_dir); + CHECK_STR_EQ("a:b/c", conf->ignore_headers_in_manifest); CHECK_STR_EQ_FREE1(format("%s%s", user, user), conf->log_file); CHECK_INT_EQ(17, conf->max_files); CHECK_INT_EQ(123 * 1000 * 1000, conf->max_size); @@ -359,6 +362,7 @@ TEST(conf_print_items) "efth", true, true, + "ihim", "lf", 4711, 98.7 * 1000 * 1000, @@ -399,6 +403,7 @@ TEST(conf_print_items) CHECK_STR_EQ("extra_files_to_hash = efth", received_conf_items[n++].descr); CHECK_STR_EQ("hard_link = true", received_conf_items[n++].descr); CHECK_STR_EQ("hash_dir = true", received_conf_items[n++].descr); + CHECK_STR_EQ("ignore_headers_in_manifest = ihim", received_conf_items[n++].descr); CHECK_STR_EQ("log_file = lf", received_conf_items[n++].descr); CHECK_STR_EQ("max_files = 4711", received_conf_items[n++].descr); CHECK_STR_EQ("max_size = 98.7M", received_conf_items[n++].descr); |