Skip to content

Commit ce46a1f

Browse files
committed
Fix issue with curl test result in regression tests
1 parent 4cce939 commit ce46a1f

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

tests/scripts/000_prepare.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,19 +25,21 @@ CURL_MIN_VERSION="8.3.0"
2525
check_run_environment() {
2626
inc total_count
2727

28+
have_curl=
2829
# get the earliest version between the installed curl version and $CURL_MIN_VERSION
2930
local curl_ver="$( (curl -V | sed -n 's/^curl \([0-9][.0-9]*\).*/\1/p'; echo "$CURL_MIN_VERSION")|sort -V|head -1)"
3031
# If installed curl is earlier than $CURL_MIN_VERSION...
3132
if [ "$curl_ver" != "$CURL_MIN_VERSION" ]; then
3233
log_crit "The installed version of curl must be version $CURL_MIN_VERSION or above to run these regression tests (found version $curl_ver)"
3334
inc fail_count
3435
else
36+
have_curl=true
3537
inc ok_count
3638
fi
3739
}
3840

3941
start_network_functions() {
40-
if [ -z "$CURL" ]; then return; fi
42+
if [ -z "$have_curl" ]; then return; fi
4143
export DB_URI="mongodb://localhost/open5gs"
4244
export http_proxy=
4345
export https_proxy=
@@ -79,11 +81,6 @@ start_network_functions() {
7981
stop_network_functions() {
8082
inc total_count
8183

82-
if [ -z "$CURL" ]; then
83-
inc pass_count
84-
return
85-
fi
86-
8784
if [ -n "$dcaf_pid" ]; then
8885
kill "$dcaf_pid"
8986
rm -f "dcaf.log"

0 commit comments

Comments
 (0)