Associate unit test data dir with a more specific variable

Having 'TESTS', the Automake variable and 'TESTS' the unit test data dir
seems confusing, lets rename the latter to to 'TESTS_DIR'.
This commit is contained in:
Michal Nowak
2020-06-02 18:21:13 +02:00
parent 1a9141fa3a
commit eddece7841
5 changed files with 6 additions and 6 deletions

View File

@@ -3,7 +3,7 @@
AM_CPPFLAGS += \
$(CMOCKA_CFLAGS) \
-DTESTS=\"$(abs_srcdir)\" \
-DTESTS_DIR=\"$(abs_srcdir)\" \
-DNAMED_PLUGINDIR=\"$(libdir)/named\"
LDADD = \

View File

@@ -179,7 +179,7 @@ dns_test_begin(FILE *logfile, bool start_managers) {
* that access test data files must first chdir to the proper
* location.
*/
if (chdir(TESTS) == -1) {
if (chdir(TESTS_DIR) == -1) {
CHECK(ISC_R_FAILURE);
}

View File

@@ -39,7 +39,7 @@ setup_test(void) {
* that access test data files must first chdir to the proper
* location.
*/
assert_return_code(chdir(TESTS), 0);
assert_return_code(chdir(TESTS_DIR), 0);
}
/* test irs_resconf_load() */

View File

@@ -57,7 +57,7 @@ isc_file_sanitize_test(void **state) {
UNUSED(state);
assert_return_code(chdir(TESTS), 0);
assert_return_code(chdir(TESTS_DIR), 0);
result = isc_file_sanitize("testdata/file", NAME, "test", buf, 1024);
assert_int_equal(result, ISC_R_SUCCESS);
@@ -93,7 +93,7 @@ isc_file_template_test(void **state) {
UNUSED(state);
assert_return_code(chdir(TESTS), 0);
assert_return_code(chdir(TESTS_DIR), 0);
result = isc_file_template("/absolute/path", "file-XXXXXXXX", buf,
sizeof(buf));

View File

@@ -315,7 +315,7 @@ ns_test_begin(FILE *logfile, bool start_managers) {
* that access test data files must first chdir to the proper
* location.
*/
if (chdir(TESTS) == -1) {
if (chdir(TESTS_DIR) == -1) {
CHECK(ISC_R_FAILURE);
}