Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
a163f02c
Commit
a163f02c
authored
Oct 05, 2015
by
Jeff Grafton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add option to save the verbose output from unit tests
Also enable this option in our Jenkins runs.
parent
608244fb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
gotest.sh
hack/jenkins/gotest.sh
+2
-0
test-go.sh
hack/test-go.sh
+6
-1
No files found.
hack/jenkins/gotest.sh
View file @
a163f02c
...
@@ -38,6 +38,8 @@ go get -u github.com/jstemmer/go-junit-report
...
@@ -38,6 +38,8 @@ go get -u github.com/jstemmer/go-junit-report
export
KUBE_RACE
=
-race
export
KUBE_RACE
=
-race
# Produce a JUnit-style XML test report for Jenkins.
# Produce a JUnit-style XML test report for Jenkins.
export
KUBE_JUNIT_REPORT_DIR
=
${
WORKSPACE
}
/_artifacts
export
KUBE_JUNIT_REPORT_DIR
=
${
WORKSPACE
}
/_artifacts
# Save the verbose stdout as well.
export
KUBE_KEEP_VERBOSE_TEST_OUTPUT
=
y
./hack/test-go.sh
./hack/test-go.sh
./hack/test-integration.sh
./hack/test-integration.sh
hack/test-go.sh
View file @
a163f02c
...
@@ -65,6 +65,9 @@ KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,experimental/v1alpha1"}
...
@@ -65,6 +65,9 @@ KUBE_TEST_API_VERSIONS=${KUBE_TEST_API_VERSIONS:-"v1,experimental/v1alpha1"}
KUBE_TEST_ETCD_PREFIXES
=
${
KUBE_TEST_ETCD_PREFIXES
:-
"registry,kubernetes.io/registry"
}
KUBE_TEST_ETCD_PREFIXES
=
${
KUBE_TEST_ETCD_PREFIXES
:-
"registry,kubernetes.io/registry"
}
# Create a junit-style XML test report in this directory if set.
# Create a junit-style XML test report in this directory if set.
KUBE_JUNIT_REPORT_DIR
=
${
KUBE_JUNIT_REPORT_DIR
:-}
KUBE_JUNIT_REPORT_DIR
=
${
KUBE_JUNIT_REPORT_DIR
:-}
# Set to 'y' to keep the verbose stdout from tests when KUBE_JUNIT_REPORT_DIR is
# set.
KUBE_KEEP_VERBOSE_TEST_OUTPUT
=
${
KUBE_KEEP_VERBOSE_TEST_OUTPUT
:-
n
}
kube::test::usage
()
{
kube::test::usage
()
{
kube::log::usage_from_stdin
<<
EOF
kube::log::usage_from_stdin
<<
EOF
...
@@ -162,7 +165,9 @@ produceJUnitXMLReport() {
...
@@ -162,7 +165,9 @@ produceJUnitXMLReport() {
return
return
fi
fi
cat
${
test_stdout_filenames
}
| go-junit-report
>
"
${
junit_xml_filename
}
"
cat
${
test_stdout_filenames
}
| go-junit-report
>
"
${
junit_xml_filename
}
"
rm
${
test_stdout_filenames
}
if
[[
!
${
KUBE_KEEP_VERBOSE_TEST_OUTPUT
}
=
~ ^[yY]
$
]]
;
then
rm
${
test_stdout_filenames
}
fi
kube::log::status
"Saved JUnit XML test report to
${
junit_xml_filename
}
"
kube::log::status
"Saved JUnit XML test report to
${
junit_xml_filename
}
"
}
}
...
...
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