Define try_chdir everywhere
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
diff --git a/tests/suites/main_test.function b/tests/suites/main_test.function
index d12e056..729619e 100644
--- a/tests/suites/main_test.function
+++ b/tests/suites/main_test.function
@@ -278,7 +278,6 @@
mbedtls_test_hook_error_add = &mbedtls_test_err_add_check;
#endif
-#ifdef MBEDTLS_HAVE_CHDIR
/* Try changing to the directory containing the executable, if
* using the default data file. This allows running the executable
* from another directory (e.g. the project root) and still access
@@ -290,8 +289,7 @@
* test-specific files such as the outcome file, which is arguably
* not desirable and should be fixed later.
*/
- try_chdir(argv[0]);
-#endif /* MBEDTLS_HAVE_CHDIR */
+ try_chdir_if_supported(argv[0]);
int ret = mbedtls_test_platform_setup();
if (ret != 0) {