Skip to content

Commit 7d661a2

Browse files
author
OpenShift Bot
authored
Merge pull request #15227 from liggitt/osx-integration-fix
Merged by openshift-bot
2 parents 9ae8fce + 02cb731 commit 7d661a2

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

hack/lib/util/misc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ function os::util::curl_etcd() {
181181
-out "${etcd_client_cert_p12}" \
182182
-password "pass:${etcd_client_cert_p12_password}"
183183
fi
184-
b
184+
185185
curl --fail --silent --cacert "${ca_bundle}" \
186186
--cert "${etcd_client_cert_p12}:${etcd_client_cert_p12_password}" "${full_url}"
187187
else

hack/test-integration.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,19 @@ loop="${TIMES:-1}"
106106
# hack/test-integration.sh WatchBuilds
107107
# hack/test-integration.sh Template*
108108
# hack/test-integration.sh "(WatchBuilds|Template)"
109-
tests=( $(go run "${OS_ROOT}/hack/listtests.go" -prefix="${OS_GO_PACKAGE}/${package}.Test" "${testexec}" | grep -E "${1-Test}") )
109+
listTemplate='{{ range $i,$file := .TestGoFiles }}{{$.Dir}}/{{ $file }}{{ "\n" }}{{end}}'
110+
tests=( $(go list -f "${listTemplate}" "./${package}" | xargs grep -E -o --no-filename '^func Test[^(]+' | cut -d ' ' -f 2 | grep -E "${1-Test}") )
111+
112+
if [[ "${#tests[@]}" == "0" ]]; then
113+
os::text::print_red "No tests found matching \"${1-Test}\""
114+
exit 1
115+
fi
110116

111117
# run each test as its own process
112118
ret=0
113119
test_result="ok"
114120
pushd "${OS_ROOT}/${package}" &>/dev/null
115-
test_start_time=$(date +%s%3N)
121+
test_start_time=$(date +%s)
116122
for test in "${tests[@]}"; do
117123
for((i=0;i<${loop};i+=1)); do
118124
if ! (exectest "${test}" ${@:2}); then
@@ -121,10 +127,10 @@ for test in "${tests[@]}"; do
121127
fi
122128
done
123129
done
124-
test_end_time=$(date +%s%3N)
130+
test_end_time=$(date +%s)
125131
test_duration=$((test_end_time - test_start_time))
126132

127-
echo "${test_result} github.com/openshift/origin/test/integration $((test_duration / 1000)).$((test_duration % 1000))s" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}"
133+
echo "${test_result} github.com/openshift/origin/test/integration $((test_duration)).000s" >> "${JUNIT_REPORT_OUTPUT:-/dev/null}"
128134

129135
popd &>/dev/null
130136

0 commit comments

Comments
 (0)