Unverified Commit eebc5e0d by Edward Thomson Committed by GitHub

Merge pull request #4257 from pks-t/pks/stale-test

Execute stale tests
parents a223bae5 5874e151
...@@ -17,7 +17,7 @@ env: ...@@ -17,7 +17,7 @@ env:
- secure: "YnhS+8n6B+uoyaYfaJ3Lei7cSJqHDPiKJCKFIF2c87YDfmCvAJke8QtE7IzjYDs7UFkTCM4ox+ph2bERUrxZbSCyEkHdjIZpKuMJfYWja/jgMqTMxdyOH9y8JLFbZsSXDIXDwqBlC6vVyl1fP90M35wuWcNTs6tctfVWVofEFbs=" - secure: "YnhS+8n6B+uoyaYfaJ3Lei7cSJqHDPiKJCKFIF2c87YDfmCvAJke8QtE7IzjYDs7UFkTCM4ox+ph2bERUrxZbSCyEkHdjIZpKuMJfYWja/jgMqTMxdyOH9y8JLFbZsSXDIXDwqBlC6vVyl1fP90M35wuWcNTs6tctfVWVofEFbs="
- GITTEST_INVASIVE_FS_SIZE=1 - GITTEST_INVASIVE_FS_SIZE=1
matrix: matrix:
- OPTIONS="-DTHREADSAFE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_WERROR=ON" - OPTIONS="-DTHREADSAFE=ON -DENABLE_TRACE=ON -DCMAKE_BUILD_TYPE=Release -DENABLE_WERROR=ON"
- OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DENABLE_WERROR=ON" - OPTIONS="-DTHREADSAFE=OFF -DBUILD_EXAMPLES=ON -DENABLE_WERROR=ON"
dist: trusty dist: trusty
......
...@@ -48,13 +48,8 @@ test_script: ...@@ -48,13 +48,8 @@ test_script:
# Run this early so we know it's ready by the time we need it # 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 } $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 libgit2_clar
$env:GITTEST_REMOTE_URL="https://github.com/libgit2/non-existent"
$env:GITTEST_REMOTE_USER="libgit2test"
ctest -V -R libgit2_clar-cred_callback
Receive-Job -Job $proxyJob Receive-Job -Job $proxyJob
$env:GITTEST_REMOTE_PROXY_URL = "http://foo:bar@localhost:8080" $env:GITTEST_REMOTE_PROXY_URL = "localhost:8080"
ctest -V -R libgit2_clar-proxy_credentials_in_url
$env:GITTEST_REMOTE_PROXY_URL = "http://localhost:8080"
$env:GITTEST_REMOTE_PROXY_USER = "foo" $env:GITTEST_REMOTE_PROXY_USER = "foo"
$env:GITTEST_REMOTE_PROXY_PASS = "bar" $env:GITTEST_REMOTE_PROXY_PASS = "bar"
ctest -V -R libgit2_clar-proxy_credentials_request ctest -V -R libgit2_clar-proxy_credentials
...@@ -85,32 +85,18 @@ else ...@@ -85,32 +85,18 @@ else
export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F '[localhost]:2222' -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':') export GITTEST_REMOTE_SSH_FINGERPRINT=$(ssh-keygen -F '[localhost]:2222' -l | tail -n 1 | cut -d ' ' -f 2 | tr -d ':')
fi fi
# Use the SSH server
export GITTEST_REMOTE_URL="ssh://localhost:2222/$HOME/_temp/test.git" export GITTEST_REMOTE_URL="ssh://localhost:2222/$HOME/_temp/test.git"
export GITTEST_REMOTE_USER=$USER export GITTEST_REMOTE_USER=$USER
export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/id_rsa" export GITTEST_REMOTE_SSH_KEY="$HOME/.ssh/id_rsa"
export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub" export GITTEST_REMOTE_SSH_PUBKEY="$HOME/.ssh/id_rsa.pub"
export GITTEST_REMOTE_SSH_PASSPHRASE="" export GITTEST_REMOTE_SSH_PASSPHRASE=""
ctest -V -R libgit2_clar-ssh || exit $?
# Use the proxy we started at the beginning
if [ -e ./libgit2_clar ]; then export GITTEST_REMOTE_PROXY_URL="localhost:8080"
./libgit2_clar -sonline::push -sonline::clone::ssh_cert && export GITTEST_REMOTE_PROXY_USER="foo"
./libgit2_clar -sonline::clone::ssh_with_paths || exit $? export GITTEST_REMOTE_PROXY_PASS="bar"
if [ "$TRAVIS_OS_NAME" = "linux" ]; then ctest -V -R libgit2_clar-proxy_credentials || exit $?
./libgit2_clar -sonline::clone::cred_callback || exit $?
fi
# Use the proxy we started at the beginning
export GITTEST_REMOTE_PROXY_URL="http://foo:bar@localhost:8080/"
./libgit2_clar -sonline::clone::proxy_credentials_in_url || exit $?
export GITTEST_REMOTE_PROXY_URL="http://localhost:8080/"
export GITTEST_REMOTE_PROXY_USER="foo"
export GITTEST_REMOTE_PROXY_PASS="bar"
./libgit2_clar -sonline::clone::proxy_credentials_request || exit $?
fi
kill $(cat "$HOME/sshd/pid") kill $(cat "$HOME/sshd/pid")
export GITTEST_REMOTE_URL="https://github.com/libgit2/non-existent"
export GITTEST_REMOTE_USER="libgit2test"
ctest -V -R libgit2_clar-cred_callback
...@@ -20,7 +20,7 @@ ENDIF() ...@@ -20,7 +20,7 @@ ENDIF()
ADD_CUSTOM_COMMAND( ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clar.suite OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/clar.suite
COMMAND ${PYTHON_EXECUTABLE} generate.py -o "${CMAKE_CURRENT_BINARY_DIR}" -f -xonline -xstress . COMMAND ${PYTHON_EXECUTABLE} generate.py -o "${CMAKE_CURRENT_BINARY_DIR}" -f -xonline -xstress -xperf .
DEPENDS ${SRC_TEST} DEPENDS ${SRC_TEST}
WORKING_DIRECTORY ${CLAR_PATH} WORKING_DIRECTORY ${CLAR_PATH}
) )
...@@ -58,8 +58,6 @@ ELSE () ...@@ -58,8 +58,6 @@ 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) 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 () ENDIF ()
# Add a test target which runs the cred callback tests, to be # Add additional test targets that require special setup
# called after setting the url and user 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-cred_callback "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::clone::cred_callback) ADD_TEST(libgit2_clar-ssh "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)
ADD_TEST(libgit2_clar-proxy_credentials_in_url "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::clone::proxy_credentials_in_url)
ADD_TEST(libgit2_clar-proxy_credentials_request "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::clone::proxy_credentials_request)
...@@ -1096,6 +1096,8 @@ void test_checkout_tree__filemode_preserved_in_workdir(void) ...@@ -1096,6 +1096,8 @@ void test_checkout_tree__filemode_preserved_in_workdir(void)
cl_assert(!GIT_PERMS_IS_EXEC(read_filemode("a/b.txt"))); cl_assert(!GIT_PERMS_IS_EXEC(read_filemode("a/b.txt")));
git_commit_free(commit); git_commit_free(commit);
#else
cl_skip();
#endif #endif
} }
......
...@@ -51,8 +51,7 @@ void expect_iterator_items( ...@@ -51,8 +51,7 @@ void expect_iterator_items(
cl_assert(entry->mode != GIT_FILEMODE_TREE); cl_assert(entry->mode != GIT_FILEMODE_TREE);
} }
if (++count >= expected_flat) cl_assert(++count <= expected_flat);
break;
} }
assert_at_end(i, v); assert_at_end(i, v);
......
...@@ -662,7 +662,7 @@ void test_iterator_workdir__filesystem_gunk(void) ...@@ -662,7 +662,7 @@ void test_iterator_workdir__filesystem_gunk(void)
/* should only have 13 items, since we're not asking for trees to be /* should only have 13 items, since we're not asking for trees to be
* returned. the goal of this test is simply to not crash. * returned. the goal of this test is simply to not crash.
*/ */
expect_iterator_items(i, 13, NULL, 13, NULL); expect_iterator_items(i, 15, NULL, 15, NULL);
git_iterator_free(i); git_iterator_free(i);
git_buf_free(&parent); git_buf_free(&parent);
} }
...@@ -741,6 +741,8 @@ void test_iterator_workdir__skips_fifos_and_special_files(void) ...@@ -741,6 +741,8 @@ void test_iterator_workdir__skips_fifos_and_special_files(void)
cl_assert_equal_i(GIT_ITEROVER, git_iterator_advance(&e, i)); cl_assert_equal_i(GIT_ITEROVER, git_iterator_advance(&e, i));
git_iterator_free(i); git_iterator_free(i);
#else
cl_skip();
#endif #endif
} }
......
...@@ -263,8 +263,8 @@ static int cred_failure_cb( ...@@ -263,8 +263,8 @@ static int cred_failure_cb(
void test_online_clone__cred_callback_failure_return_code_is_tunnelled(void) void test_online_clone__cred_callback_failure_return_code_is_tunnelled(void)
{ {
if (!_remote_url || !_remote_user) _remote_url = git__strdup("https://github.com/libgit2/non-existent");
clar__skip(); _remote_user = git__strdup("libgit2test");
g_options.fetch_opts.callbacks.credentials = cred_failure_cb; g_options.fetch_opts.callbacks.credentials = cred_failure_cb;
...@@ -293,8 +293,8 @@ void test_online_clone__cred_callback_called_again_on_auth_failure(void) ...@@ -293,8 +293,8 @@ void test_online_clone__cred_callback_called_again_on_auth_failure(void)
{ {
size_t counter = 0; size_t counter = 0;
if (!_remote_url || !_remote_user) _remote_url = git__strdup("https://github.com/libgit2/non-existent");
clar__skip(); _remote_user = git__strdup("libgit2test");
g_options.fetch_opts.callbacks.credentials = cred_count_calls_cb; g_options.fetch_opts.callbacks.credentials = cred_count_calls_cb;
g_options.fetch_opts.callbacks.payload = &counter; g_options.fetch_opts.callbacks.payload = &counter;
...@@ -677,24 +677,34 @@ static int proxy_creds(git_cred **out, const char *url, const char *username, un ...@@ -677,24 +677,34 @@ static int proxy_creds(git_cred **out, const char *url, const char *username, un
void test_online_clone__proxy_credentials_request(void) void test_online_clone__proxy_credentials_request(void)
{ {
git_buf url = GIT_BUF_INIT;
if (!_remote_proxy_url || !_remote_proxy_user || !_remote_proxy_pass) if (!_remote_proxy_url || !_remote_proxy_user || !_remote_proxy_pass)
cl_skip(); cl_skip();
cl_git_pass(git_buf_printf(&url, "http://%s/", _remote_proxy_url));
g_options.fetch_opts.proxy_opts.type = GIT_PROXY_SPECIFIED; g_options.fetch_opts.proxy_opts.type = GIT_PROXY_SPECIFIED;
g_options.fetch_opts.proxy_opts.url = _remote_proxy_url; g_options.fetch_opts.proxy_opts.url = url.ptr;
g_options.fetch_opts.proxy_opts.credentials = proxy_creds; g_options.fetch_opts.proxy_opts.credentials = proxy_creds;
called_proxy_creds = 0; called_proxy_creds = 0;
cl_git_pass(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options)); cl_git_pass(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options));
cl_assert(called_proxy_creds); cl_assert(called_proxy_creds);
git_buf_free(&url);
} }
void test_online_clone__proxy_credentials_in_url(void) void test_online_clone__proxy_credentials_in_url(void)
{ {
if (!_remote_proxy_url) git_buf url = GIT_BUF_INIT;
if (!_remote_proxy_url || !_remote_proxy_user || !_remote_proxy_pass)
cl_skip(); cl_skip();
cl_git_pass(git_buf_printf(&url, "http://%s:%s@%s/", _remote_proxy_user, _remote_proxy_pass, _remote_proxy_url));
g_options.fetch_opts.proxy_opts.type = GIT_PROXY_SPECIFIED; g_options.fetch_opts.proxy_opts.type = GIT_PROXY_SPECIFIED;
g_options.fetch_opts.proxy_opts.url = _remote_proxy_url; g_options.fetch_opts.proxy_opts.url = url.ptr;
called_proxy_creds = 0; called_proxy_creds = 0;
cl_git_pass(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options)); cl_git_pass(git_clone(&g_repo, "http://github.com/libgit2/TestGitRepository", "./foo", &g_options));
cl_assert(called_proxy_creds == 0); cl_assert(called_proxy_creds == 0);
......
...@@ -25,20 +25,7 @@ ...@@ -25,20 +25,7 @@
#define ID_BRANCH_A "d853fb9f24e0fe63b3dce9fbc04fd9cfe17a030b" #define ID_BRANCH_A "d853fb9f24e0fe63b3dce9fbc04fd9cfe17a030b"
#define ID_BRANCH_B "1ce9ea3ba9b4fa666602d52a5281d41a482cc58b" #define ID_BRANCH_B "1ce9ea3ba9b4fa666602d52a5281d41a482cc58b"
void test_perf_merge__initialize(void)
{
}
void test_perf_merge__cleanup(void)
{
}
void test_perf_merge__m1(void) void test_perf_merge__m1(void)
{ {
#if 1
cl_skip();
#else
perf__do_merge(SRC_REPO, "m1", ID_BRANCH_A, ID_BRANCH_B); perf__do_merge(SRC_REPO, "m1", ID_BRANCH_A, ID_BRANCH_B);
#endif
} }
...@@ -180,6 +180,8 @@ void test_repo_open__from_git_new_workdir(void) ...@@ -180,6 +180,8 @@ void test_repo_open__from_git_new_workdir(void)
cl_assert_(git__suffixcmp(git_repository_workdir(repo2), "alternate/") == 0, git_repository_workdir(repo2)); cl_assert_(git__suffixcmp(git_repository_workdir(repo2), "alternate/") == 0, git_repository_workdir(repo2));
git_repository_free(repo2); git_repository_free(repo2);
#else
cl_skip();
#endif #endif
} }
......
...@@ -1072,6 +1072,8 @@ void test_status_worktree__unreadable(void) ...@@ -1072,6 +1072,8 @@ void test_status_worktree__unreadable(void)
cl_assert_equal_i(counts.expected_entry_count, counts.entry_count); cl_assert_equal_i(counts.expected_entry_count, counts.entry_count);
cl_assert_equal_i(0, counts.wrong_status_flags_count); cl_assert_equal_i(0, counts.wrong_status_flags_count);
cl_assert_equal_i(0, counts.wrong_sorted_path); cl_assert_equal_i(0, counts.wrong_sorted_path);
#else
cl_skip();
#endif #endif
} }
...@@ -1106,6 +1108,8 @@ void test_status_worktree__unreadable_not_included(void) ...@@ -1106,6 +1108,8 @@ void test_status_worktree__unreadable_not_included(void)
cl_assert_equal_i(counts.expected_entry_count, counts.entry_count); cl_assert_equal_i(counts.expected_entry_count, counts.entry_count);
cl_assert_equal_i(0, counts.wrong_status_flags_count); cl_assert_equal_i(0, counts.wrong_status_flags_count);
cl_assert_equal_i(0, counts.wrong_sorted_path); cl_assert_equal_i(0, counts.wrong_sorted_path);
#else
cl_skip();
#endif #endif
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment