summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorSergei Nikulov <sergey.nikulov@gmail.com>2020-10-12 22:44:37 +0300
committerMarc Hoersken <info@marc-hoersken.de>2020-10-14 07:03:55 +0200
commitd8fffd718b26b3a18047dc17c4516a4e0fa8cc1e (patch)
tree10552c397a359313242d9c1d465a6369f3750469 /tests
parent112418070a5e61de248509b4bbb4986c962094f8 (diff)
downloadcurl-d8fffd718b26b3a18047dc17c4516a4e0fa8cc1e.tar.gz
CI/tests: fix invocation of tests for CMake builds
Update appveyor.yml to set env variable TFLAGS and run tests Remove curly braces due to CMake error (${TFLAGS} -> $TFLAGS) Move testdeps build to build step (per review comments) Reviewed-by: Marc Hörsken Closes #6066 Fixes #6052
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt4
-rwxr-xr-xtests/runtests.pl4
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 60ce5c262..9f3e4753e 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -26,7 +26,7 @@ add_subdirectory(server)
add_subdirectory(unit)
function(add_runtests targetname test_flags)
- # Use a special '${TFLAGS}' placeholder as last argument which will be
+ # Use a special '$TFLAGS' placeholder as last argument which will be
# replaced by the contents of the environment variable in runtests.pl.
# This is a workaround for CMake's limitation where commands executed by
# 'make' or 'ninja' cannot portably reference environment variables.
@@ -35,7 +35,7 @@ function(add_runtests targetname test_flags)
COMMAND
"${PERL_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/runtests.pl"
${test_flags_list}
- "\${TFLAGS}"
+ "\$TFLAGS"
DEPENDS testdeps
VERBATIM USES_TERMINAL
)
diff --git a/tests/runtests.pl b/tests/runtests.pl
index cc66f31cf..84feb73e0 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -5180,9 +5180,9 @@ disabledtests("$TESTDIR/DISABLED.local");
# Check options to this test program
#
-# Special case for CMake: replace '${TFLAGS}' by the contents of the
+# Special case for CMake: replace '$TFLAGS' by the contents of the
# environment variable (if any).
-if(@ARGV && $ARGV[-1] eq '${TFLAGS}') {
+if(@ARGV && $ARGV[-1] eq '$TFLAGS') {
pop @ARGV;
push(@ARGV, split(' ', $ENV{'TFLAGS'})) if defined($ENV{'TFLAGS'});
}