mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
60297a1bbe
* Added test runner and build files * Changes to int test to output junit results. * Updated documentation, removed comments Signed-off-by: dereknola <derek.nola@suse.com>
30 lines
741 B
Bash
Executable File
30 lines
741 B
Bash
Executable File
#!/bin/sh
|
|
|
|
set -x
|
|
|
|
results_dir="${RESULTS_DIR:-/tmp/results}"
|
|
|
|
# saveResults prepares the results for handoff to the Sonobuoy worker.
|
|
# See: https://github.com/vmware-tanzu/sonobuoy/blob/master/site/content/docs/master/plugins.md
|
|
saveResults() {
|
|
cd ${results_dir}
|
|
|
|
# Sonobuoy worker expects a tar file.
|
|
tar czf results.tar.gz *
|
|
|
|
# Signal to the worker that we are done and where to find the results.
|
|
printf ${results_dir}/results.tar.gz > ${results_dir}/done
|
|
}
|
|
|
|
# Ensure that we tell the Sonobuoy worker we are done regardless of results.
|
|
trap saveResults EXIT
|
|
|
|
runTests() {
|
|
cd ./tests
|
|
for t in *.test; do
|
|
# Run each test (automatically saves the output in the results directory).
|
|
./$t
|
|
done
|
|
}
|
|
runTests
|