diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2013-05-15 13:11:43 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2013-05-16 11:53:34 +0800 |
commit | e0a7cb18a4237aa826e5e121ff17373814a1872d (patch) | |
tree | 110f5785d90478752e7a194c4f4ae4c76692f3b1 /test/parser/parser-test.h | |
parent | a5a787c5d170708be5d15ee9418520917653a104 (diff) | |
download | talos-petitboot-e0a7cb18a4237aa826e5e121ff17373814a1872d.tar.gz talos-petitboot-e0a7cb18a4237aa826e5e121ff17373814a1872d.zip |
test/parser: Allow raw config data in test .c files
Add a little post-processing script (extract-config.awk) to allow us to
put the config data directly into the test .c files, without having to
quote the C string.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Diffstat (limited to 'test/parser/parser-test.h')
-rw-r--r-- | test/parser/parser-test.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/parser/parser-test.h b/test/parser/parser-test.h index 5baa458..76132d5 100644 --- a/test/parser/parser-test.h +++ b/test/parser/parser-test.h @@ -31,4 +31,10 @@ void test_read_conf_file(struct parser_test *test, const char *filename); int test_run_parser(struct parser_test *test, const char *parser_name); +/* embedded config */ +extern const char __embedded_config[]; +extern const size_t __embedded_config_size; +#define test_read_conf_embedded(t) \ + __test_read_conf_data(t, __embedded_config, __embedded_config_size) + #endif /* PARSER_TEST_H */ |