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:
@@ -3,7 +3,7 @@
|
||||
|
||||
AM_CPPFLAGS += \
|
||||
$(CMOCKA_CFLAGS) \
|
||||
-DTESTS=\"$(abs_srcdir)\" \
|
||||
-DTESTS_DIR=\"$(abs_srcdir)\" \
|
||||
-DNAMED_PLUGINDIR=\"$(libdir)/named\"
|
||||
|
||||
LDADD = \
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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() */
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user