Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
a360b013
Unverified
Commit
a360b013
authored
Dec 18, 2023
by
Edward Thomson
Committed by
GitHub
Dec 18, 2023
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6694 from libgit2/ethomson/ci
CI fixes
parents
25262e94
c529b2c7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
13 deletions
+30
-13
ci/test.sh
+30
-13
No files found.
ci/test.sh
View file @
a360b013
...
...
@@ -3,7 +3,14 @@
set
-e
if
[
-n
"
$SKIP_TESTS
"
]
;
then
exit
0
if
[
-z
"
$SKIP_OFFLINE_TESTS
"
]
;
then
SKIP_OFFLINE_TESTS
=
1
;
fi
if
[
-z
"
$SKIP_ONLINE_TESTS
"
]
;
then
SKIP_ONLINE_TESTS
=
1
;
fi
if
[
-z
"
$SKIP_GITDAEMON_TESTS
"
]
;
then
SKIP_GITDAEMON_TESTS
=
1
;
fi
if
[
-z
"
$SKIP_PROXY_TESTS
"
]
;
then
SKIP_PROXY_TESTS
=
1
;
fi
if
[
-z
"
$SKIP_NTLM_TESTS
"
]
;
then
SKIP_NTLM_TESTS
=
1
;
fi
if
[
-z
"
$SKIP_NEGOTIATE_TESTS
"
]
;
then
SKIP_NEGOTIATE_TESTS
=
1
;
fi
if
[
-z
"
$SKIP_SSH_TESTS
"
]
;
then
SKIP_SSH_TESTS
=
1
;
fi
if
[
-z
"
$SKIP_FUZZERS
"
]
;
then
SKIP_FUZZERS
=
1
;
fi
fi
# Windows doesn't run the NTLM tests properly (yet)
...
...
@@ -24,6 +31,16 @@ export CLAR_HOMEDIR=${HOME}
SUCCESS
=
1
CONTINUE_ON_FAILURE
=
0
should_run
()
{
eval
"skip=
\$
{SKIP_
${
1
}
}"
[
-z
"
$skip
"
\
-o
"
$skip
"
==
"no"
-o
"
$skip
"
==
"NO"
\
-o
"
$skip
"
==
"n"
-o
"
$skip
"
==
"N"
\
-o
"
$skip
"
==
"false"
-o
"
$skip
"
==
"FALSE"
\
-o
"
$skip
"
==
"f"
-o
"
$skip
"
==
"F"
\
-o
"
$skip
"
==
"0"
]
}
cleanup
()
{
echo
"Cleaning up..."
...
...
@@ -140,7 +157,7 @@ echo "##########################################################################
echo
""
if
[
-z
"
$SKIP_GITDAEMON_TESTS
"
]
;
then
if
should_run
"GITDAEMON_TESTS"
;
then
echo
"Starting git daemon (standard)..."
GIT_STANDARD_DIR
=
`
mktemp
-d
${
TMPDIR
}
/git_standard.XXXXXXXX
`
git init
--bare
"
${
GIT_STANDARD_DIR
}
/test.git"
>
/dev/null
...
...
@@ -160,7 +177,7 @@ if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
GIT_SHA256_PID
=
$!
fi
if
[
-z
"
$SKIP_PROXY_TESTS
"
]
;
then
if
should_run
"PROXY_TESTS"
;
then
curl
--location
--silent
--show-error
https://github.com/ethomson/poxyproxy/releases/download/v0.7.0/poxyproxy-0.7.0.jar
>
poxyproxy.jar
echo
"Starting HTTP proxy (Basic)..."
...
...
@@ -172,7 +189,7 @@ if [ -z "$SKIP_PROXY_TESTS" ]; then
PROXY_NTLM_PID
=
$!
fi
if
[
-z
"
$SKIP_NTLM_TESTS
"
-o
-z
"
$SKIP_ONLINE_TESTS
"
]
;
then
if
should_run
"NTLM_TESTS"
||
should_run
"ONLINE_TESTS"
;
then
curl
--location
--silent
--show-error
https://github.com/ethomson/poxygit/releases/download/v0.6.0/poxygit-0.6.0.jar
>
poxygit.jar
echo
"Starting HTTP server..."
...
...
@@ -182,7 +199,7 @@ if [ -z "$SKIP_NTLM_TESTS" -o -z "$SKIP_ONLINE_TESTS" ]; then
HTTP_PID
=
$!
fi
if
[
-z
"
$SKIP_SSH_TESTS
"
]
;
then
if
should_run
"SSH_TESTS"
;
then
echo
"Starting SSH server..."
SSHD_DIR
=
`
mktemp
-d
${
TMPDIR
}
/sshd.XXXXXXXX
`
git init
--bare
"
${
SSHD_DIR
}
/test.git"
>
/dev/null
...
...
@@ -232,7 +249,7 @@ fi
# Run the tests that do not require network connectivity.
if
[
-z
"
$SKIP_OFFLINE_TESTS
"
]
;
then
if
should_run
"OFFLINE_TESTS"
;
then
echo
""
echo
"##############################################################################"
echo
"## Running core tests"
...
...
@@ -267,7 +284,7 @@ fi
# allow them to retry up to 5 times
export
GITTEST_FLAKY_RETRY
=
5
if
[
-z
"
$SKIP_ONLINE_TESTS
"
]
;
then
if
should_run
"ONLINE_TESTS"
;
then
# Run the online tests. The "online" test suite only includes the
# default online tests that do not require additional configuration.
# The "proxy" and "ssh" test suites require further setup.
...
...
@@ -296,7 +313,7 @@ if [ -z "$SKIP_ONLINE_TESTS" ]; then
run_test online_customcert
fi
if
[
-z
"
$SKIP_GITDAEMON_TESTS
"
]
;
then
if
should_run
"GITDAEMON_TESTS"
;
then
echo
""
echo
"Running gitdaemon (standard) tests"
echo
""
...
...
@@ -324,7 +341,7 @@ if [ -z "$SKIP_GITDAEMON_TESTS" ]; then
unset
GITTEST_REMOTE_URL
fi
if
[
-z
"
$SKIP_PROXY_TESTS
"
]
;
then
if
should_run
"PROXY_TESTS"
;
then
echo
""
echo
"Running proxy tests (Basic authentication)"
echo
""
...
...
@@ -350,7 +367,7 @@ if [ -z "$SKIP_PROXY_TESTS" ]; then
unset
GITTEST_REMOTE_PROXY_PASS
fi
if
[
-z
"
$SKIP_NTLM_TESTS
"
]
;
then
if
should_run
"NTLM_TESTS"
;
then
echo
""
echo
"Running NTLM tests (IIS emulation)"
echo
""
...
...
@@ -376,7 +393,7 @@ if [ -z "$SKIP_NTLM_TESTS" ]; then
unset
GITTEST_REMOTE_PASS
fi
if
[
-z
"
$SKIP_NEGOTIATE_TESTS
"
-a
-n
"
$GITTEST_NEGOTIATE_PASSWORD
"
]
;
then
if
should_run
"NEGOTIATE_TESTS"
&&
-n
"
$GITTEST_NEGOTIATE_PASSWORD
"
;
then
echo
""
echo
"Running SPNEGO tests"
echo
""
...
...
@@ -409,7 +426,7 @@ if [ -z "$SKIP_NEGOTIATE_TESTS" -a -n "$GITTEST_NEGOTIATE_PASSWORD" ]; then
kdestroy
-A
fi
if
[
-z
"
$SKIP_SSH_TESTS
"
]
;
then
if
should_run
"SSH_TESTS"
;
then
export
GITTEST_REMOTE_USER
=
$USER
export
GITTEST_REMOTE_SSH_KEY
=
"
${
HOME
}
/.ssh/id_rsa"
export
GITTEST_REMOTE_SSH_PUBKEY
=
"
${
HOME
}
/.ssh/id_rsa.pub"
...
...
@@ -445,7 +462,7 @@ fi
unset
GITTEST_FLAKY_RETRY
if
[
-z
"
$SKIP_FUZZERS
"
]
;
then
if
should_run
"FUZZERS"
;
then
echo
""
echo
"##############################################################################"
echo
"## Running fuzzers"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment