mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user