Merge branch '1726-unit-tests-rename-tests-to-something-more-descriptive' into 'master'

Associate unit test data dir with a more specific variable

Closes #1726

See merge request isc-projects/bind9!3624
This commit is contained in:
Michal Nowak 2020-06-04 10:58:55 +00:00
commit 3eabeab0f8
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);
}