[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 235/411: CI/tests: fix invocation of tests for CMake builds
From: |
gnunet |
Subject: |
[gnurl] 235/411: CI/tests: fix invocation of tests for CMake builds |
Date: |
Wed, 13 Jan 2021 01:20:50 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit d8fffd718b26b3a18047dc17c4516a4e0fa8cc1e
Author: Sergei Nikulov <sergey.nikulov@gmail.com>
AuthorDate: Mon Oct 12 22:44:37 2020 +0300
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
---
appveyor.yml | 12 ++++++++++--
tests/CMakeLists.txt | 4 ++--
tests/runtests.pl | 4 ++--
3 files changed, 14 insertions(+), 6 deletions(-)
diff --git a/appveyor.yml b/appveyor.yml
index 605fb3c88..beaa56d71 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -291,11 +291,19 @@ build_script:
if %BUILD_SYSTEM%==autotools (
bash.exe -e -l -c "cd /c/projects/curl && ./buildconf && ./configure
%CONFIG_ARGS% && make && make examples && cd tests && make"
)))))
+ - if %TESTING%==ON (
+ if %BUILD_SYSTEM%==CMake (
+ cmake --build . --config %PRJ_CFG% --parallel 2 --target testdeps
+ ))
test_script:
- if %TESTING%==ON (
- echo APPVEYOR_API_URL=%APPVEYOR_API_URL% &&
- bash.exe -e -l -c "cd /c/projects/curl/tests && ./runtests.pl -a
-b$(($(echo '%APPVEYOR_API_URL%' | cut -d'/' -f3 | cut -d':' -f2)+1)) -p !flaky
%DISABLED_TESTS%" )
+ if %BUILD_SYSTEM%==CMake (
+ set TFLAGS=%DISABLED_TESTS% &&
+ cmake --build . --config %PRJ_CFG% --target test-nonflaky
+ ) else (
+ echo APPVEYOR_API_URL=%APPVEYOR_API_URL% &&
+ bash.exe -e -l -c "cd /c/projects/curl/tests && ./runtests.pl -a
-b$(($(echo '%APPVEYOR_API_URL%' | cut -d'/' -f3 | cut -d':' -f2)+1)) -p !flaky
%DISABLED_TESTS%" ))
# select branches to avoid testing feature branches twice (as branch and as
pull request)
branches:
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'});
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 217/411: runtests: provide curl's version string as %VERSION for tests, (continued)
- [gnurl] 217/411: runtests: provide curl's version string as %VERSION for tests, gnunet, 2021/01/12
- [gnurl] 220/411: --help: move two options from the misc category, gnunet, 2021/01/12
- [gnurl] 243/411: connect: repair build without ipv6 availability, gnunet, 2021/01/12
- [gnurl] 206/411: tests/README: convert to markdown, gnunet, 2021/01/12
- [gnurl] 249/411: checksrc: warn on empty line before open brace, gnunet, 2021/01/12
- [gnurl] 208/411: TODO: Add OpenBSD libtool notice, gnunet, 2021/01/12
- [gnurl] 209/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 213/411: tool_setopt: escape binary data to hex, not octal, gnunet, 2021/01/12
- [gnurl] 260/411: curl_url_set.3: fix typo in the RETURN VALUE section, gnunet, 2021/01/12
- [gnurl] 234/411: tests/server/util.c: fix support for Windows Unicode builds, gnunet, 2021/01/12
- [gnurl] 235/411: CI/tests: fix invocation of tests for CMake builds,
gnunet <=
- [gnurl] 227/411: checksrc: detect // comments on column 0, gnunet, 2021/01/12
- [gnurl] 199/411: sectransp: make it build with --disable-proxy, gnunet, 2021/01/12
- [gnurl] 246/411: runtests: return error if no tests ran, gnunet, 2021/01/12
- [gnurl] 228/411: runtests.pl: use $LIBDIR variable instead of hardcoded path, gnunet, 2021/01/12
- [gnurl] 211/411: strerror: fix null deref on winapi out-of-memory, gnunet, 2021/01/12
- [gnurl] 237/411: mailmap: fixups of some contributors, gnunet, 2021/01/12
- [gnurl] 204/411: examples/README: convert to markdown, gnunet, 2021/01/12
- [gnurl] 252/411: http3: fix two build errors, silence warnings, gnunet, 2021/01/12
- [gnurl] 191/411: schannel: return CURLE_PEER_FAILED_VERIFICATION for untrusted root, gnunet, 2021/01/12
- [gnurl] 264/411: CMake: call the feature unixsockets without dash, gnunet, 2021/01/12