Skip to content

Commit

Permalink
Merge pull request #10083 from stevekuznetsov/skuznets/test-cmd-effort
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Nov 16, 2016
2 parents 2fc41a5 + db62c8a commit a4b7101
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions hack/test-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ function cleanup()
local sudo="${USE_SUDO:+sudo}"
${sudo} rm -rf "${ETCD_DATA_DIR}"

if [ $out -ne 0 ]; then
echo "[FAIL] !!!!! Test Failed !!!!"
echo
tail -40 "${LOG_DIR}/openshift.log"
echo
echo -------------------------------------
echo
elif go tool -n pprof >/dev/null 2>&1; then
if go tool -n pprof >/dev/null 2>&1; then
os::log::info "\`pprof\` output logged to ${LOG_DIR}/pprof.out"
go tool pprof -text "./_output/local/bin/$(os::util::host_platform)/openshift" cpu.pprof >"${LOG_DIR}/pprof.out" 2>&1
fi
Expand Down Expand Up @@ -349,12 +342,19 @@ for test in "${tests[@]}"; do
os::cmd::try_until_text "oc get projects -o name" "project/${namespace}"
os::test::junit::declare_suite_end

${test}
if ! ${test}; then
failed="true"
tail -40 "${LOG_DIR}/openshift.log"
fi
oc project ${CLUSTER_ADMIN_CONTEXT}
oc delete project "${namespace}"
cp ${KUBECONFIG}{.bak,} # since nothing ever gets deleted from kubeconfig, reset it
done

os::log::info "Metrics information logged to ${LOG_DIR}/metrics.log"
oc get --raw /metrics > "${LOG_DIR}/metrics.log"

if [[ -n "${failed:-}" ]]; then
exit 1
fi
echo "test-cmd: ok"

0 comments on commit a4b7101

Please sign in to comment.