Browse code

Merge pull request #1195 from smarterclayton/better_integration_output

Merged by openshift-bot

OpenShift Bot authored on 2015/03/02 22:58:09
Showing 1 changed files
... ...
@@ -43,7 +43,22 @@ popd 2>&1 >/dev/null
43 43
 start_etcd
44 44
 trap cleanup EXIT SIGINT
45 45
 
46
+function exectest() {
47
+  out=$("${testexec}" -test.run="^$1$" "${@:2}" 2>&1)
48
+  res=$?
49
+  if [[ ${res} -eq 0 ]]; then
50
+    echo ok $1
51
+    exit 0
52
+  else
53
+    echo "${out}"
54
+    exit 1
55
+  fi
56
+}
57
+export -f exectest
58
+export testexec
59
+export childargs
60
+
46 61
 # run each test as its own process
47 62
 pushd "./${package}" 2>&1 >/dev/null
48
-time go run "${OS_ROOT}/hack/listtests.go" -prefix="${OS_GO_PACKAGE}/${package}.Test" "${testdir}" | xargs -I {} -n 1 "${testexec}" -test.run="^{}$" "${@:1}"
63
+time go run "${OS_ROOT}/hack/listtests.go" -prefix="${OS_GO_PACKAGE}/${package}.Test" "${testdir}" | xargs -I {} -n 1 bash -c "exectest {} ${@:1}" # "${testexec}" -test.run="^{}$" "${@:1}"
49 64
 popd 2>&1 >/dev/null