From 6bafe97bc1e9c66e5e727cdf5160341ae58b4f81 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 19 Mar 2020 15:25:11 -0400 Subject: Add a TOR_SKIP_TESTCASES environment variable for suppressing tests. For example, "TOR_SKIP_TESTCASES=crypto/.. ./src/test/test" will run the tests and suppress all the "crypto/" tests. You could get the same effect by running "./src/test/test :crypto/..", but that can be harder to arrange from CI. Part of a fix/workaround for 33643. --- changes/ticket33643 | 5 +++++ src/test/testing_common.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 changes/ticket33643 diff --git a/changes/ticket33643 b/changes/ticket33643 new file mode 100644 index 0000000000..7fddab74eb --- /dev/null +++ b/changes/ticket33643 @@ -0,0 +1,5 @@ + o Minor features (testing): + - The unit tests now support a "TOR_SKIP_TESTCASES" environment variable + to specify a list of space-separated test cases that should not be + executed. We will use this to disable certain tests that are failing on + Appveyor because of mismatched OpenSSL libraries. Part of ticket 33643. diff --git a/src/test/testing_common.c b/src/test/testing_common.c index 62d40a42fa..2c9c4538b9 100644 --- a/src/test/testing_common.c +++ b/src/test/testing_common.c @@ -348,6 +348,21 @@ main(int c, const char **v) atexit(remove_directory); + /* Look for TOR_SKIP_TESTCASES: a space-separated list of tests to skip. */ + const char *skip_tests = getenv("TOR_SKIP_TESTCASES"); + if (skip_tests) { + smartlist_t *skip = smartlist_new(); + smartlist_split_string(skip, skip_tests, NULL, + SPLIT_IGNORE_BLANK, -1); + int n = 0; + SMARTLIST_FOREACH_BEGIN(skip, char *, cp) { + n += tinytest_skip(testgroups, cp); + tor_free(cp); + } SMARTLIST_FOREACH_END(cp); + printf("Skipping %d testcases.\n", n); + smartlist_free(skip); + } + int have_failed = (tinytest_main(c, v, testgroups) != 0); free_pregenerated_keys(); -- cgit v1.2.3-54-g00ecf From ee3d23c05a828dc693ead2dcf083c9091d502425 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 19 Mar 2020 15:28:55 -0400 Subject: Appveyor: disable crypto/openssl_version --- .appveyor.yml | 2 +- changes/ticket33643_part2 | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changes/ticket33643_part2 diff --git a/.appveyor.yml b/.appveyor.yml index 818e074a4e..c4f3d99841 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -95,7 +95,7 @@ test_script: $buildpath = @("C:\msys64\${env:compiler_path}\bin") + $oldpath $env:Path = $buildpath -join ';' Set-Location "${env:build}" - Execute-Bash "VERBOSE=1 make -k -j2 check" + Execute-Bash "VERBOSE=1 TOR_SKIP_TESTCASES=crypto/openssl_version make -k -j2 check" } on_finish: diff --git a/changes/ticket33643_part2 b/changes/ticket33643_part2 new file mode 100644 index 0000000000..28193d2af5 --- /dev/null +++ b/changes/ticket33643_part2 @@ -0,0 +1,3 @@ + o Testing (CI): + - On appveyor, skip the crypto/openssl_version test, which is failing + because of a mismatched library installation. Fix for 33643. -- cgit v1.2.3-54-g00ecf