Commit 08068b26 authored by Lev Walkin's avatar Lev Walkin

environment override for tests directory

parent 8ca13c8a
......@@ -39,5 +39,6 @@ check_crange_LDADD = $(noinst_LTLIBRARIES) \
check_PROGRAMS = check_crange check_fixer
TESTS_ENVIRONMENT = ASN1_TESTS_DIR=${top_srcdir}/tests
TESTS = ${check_PROGRAMS}
......@@ -58,8 +58,13 @@ main(int ac, char **av) {
* Go into a directory with tests.
*/
if(ac <= 1) {
fprintf(stderr, "Testing in " TOP_SRCDIR_S "/tests...\n");
ret = chdir(TOP_SRCDIR_S "/tests");
const char *asn1_tests_dir = getenv("ASN1_TESTS_DIR");
if(!asn1_tests_dir)
asn1_tests_dir = TOP_SRCDIR_S "/tests";
fprintf(stderr, "Testing in %s...\n", asn1_tests_dir);
ret = chdir(asn1_tests_dir);
if(ret == -1)
fprintf(stderr, "%s: %s\n", asn1_tests_dir, strerror(errno));
assert(ret == 0);
#ifdef _WIN32
dir = _findfirst("*.asn1", &c_file);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment