diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2018-07-04 10:56:56 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2018-07-26 14:07:00 +0100 |
commit | ce798b256b071f57bfd62664626c10339b3e36f7 (patch) | |
tree | a9e4c445ea5227a6343c5d81f6c2a5a2790a408b | |
parent | 7d3930a15e4b4eb292c0e24debdf1b39a6d7d63b (diff) | |
download | libgit2-ce798b256b071f57bfd62664626c10339b3e36f7.tar.gz |
tests: simplify cmake test configuration
Simplify the names for the tests, removing the unnecessary
"libgit2-clar" prefix. Make "all" the new default test run, and include
the online tests by default (since HTTPS should always be enabled).
For the CI tests, create an offline-only test, then the various online
tests.
-rw-r--r-- | appveyor.yml | 5 | ||||
-rwxr-xr-x | script/citest.sh | 8 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 14 |
3 files changed, 13 insertions, 14 deletions
diff --git a/appveyor.yml b/appveyor.yml index f76830cb4..5eac5f1b4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -52,9 +52,10 @@ test_script: Start-FileDownload https://github.com/ethomson/poxyproxy/releases/download/v0.1.0/poxyproxy-0.1.0.jar -FileName poxyproxy.jar # Run this early so we know it's ready by the time we need it $proxyJob = Start-Job { java -jar $Env:APPVEYOR_BUILD_FOLDER\build\poxyproxy.jar -d --port 8080 --credentials foo:bar } - ctest -V -R libgit2_clar + ctest -V -R offline + ctest -V -R online Receive-Job -Job $proxyJob $env:GITTEST_REMOTE_PROXY_URL = "localhost:8080" $env:GITTEST_REMOTE_PROXY_USER = "foo" $env:GITTEST_REMOTE_PROXY_PASS = "bar" - ctest -V -R libgit2_clar-proxy_credentials + ctest -V -R proxy diff --git a/script/citest.sh b/script/citest.sh index 7e6cdb7d7..281c01a78 100755 --- a/script/citest.sh +++ b/script/citest.sh @@ -25,7 +25,9 @@ git daemon --listen=localhost --export-all --enable=receive-pack --base-path="$H export GITTEST_REMOTE_URL="git://localhost/test.git" # Run the test suite -ctest -V -R libgit2_clar || exit $? +ctest -V -R offline || exit $? +ctest -V -R online || exit $? +ctest -V -R gitdaemon || exit $? # Now that we've tested the raw git protocol, let's set up ssh to we # can do the push tests over it @@ -71,12 +73,12 @@ export GITTEST_REMOTE_USER=$USER export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/id_rsa" export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub" export GITTEST_REMOTE_SSH_PASSPHRASE="" -ctest -V -R libgit2_clar-ssh || exit $? +ctest -V -R ssh || exit $? # Use the proxy we started at the beginning export GITTEST_REMOTE_PROXY_URL="localhost:8080" export GITTEST_REMOTE_PROXY_USER="foo" export GITTEST_REMOTE_PROXY_PASS="bar" -ctest -V -R libgit2_clar-proxy_credentials || exit $? +ctest -V -R proxy || exit $? kill $(cat "$HOME/sshd/pid") diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d75114b5c..950250418 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -54,12 +54,8 @@ IF (MSVC_IDE) SET_SOURCE_FILES_PROPERTIES("precompiled.c" COMPILE_FLAGS "/Ycprecompiled.h") ENDIF () -IF (USE_HTTPS) - ADD_TEST(libgit2_clar "${libgit2_BINARY_DIR}/libgit2_clar" -ionline -xclone::local::git_style_unc_paths -xclone::local::standard_unc_paths_are_written_git_style) -ELSE () - ADD_TEST(libgit2_clar "${libgit2_BINARY_DIR}/libgit2_clar" -v -xclone::local::git_style_unc_paths -xclone::local::standard_unc_paths_are_written_git_style) -ENDIF () - -# Add additional test targets that require special setup -ADD_TEST(libgit2_clar-proxy_credentials "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::clone::proxy_credentials_in_url -sonline::clone::proxy_credentials_request) -ADD_TEST(libgit2_clar-ssh "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths) +ADD_TEST(offline "${libgit2_BINARY_DIR}/libgit2_clar" -v -xonline) +ADD_TEST(online "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline) +ADD_TEST(gitdaemon "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push) +ADD_TEST(ssh "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths) +ADD_TEST(proxy "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::clone::proxy_credentials_in_url -sonline::clone::proxy_credentials_request) |