| |
@@ -19,6 +19,8 @@
|
| |
WORKDIR="$2"
|
| |
ARTIFACTSDIR="$3"
|
| |
|
| |
+ # stored raw output
|
| |
+ RAW_LOG_NAME="raw.log"
|
| |
|
| |
# MTF exit codes
|
| |
MTF_EXIT_FAIL='125'
|
| |
@@ -63,42 +65,24 @@
|
| |
cp -r /root/avocado/job-results/latest/test-results "$OUTDIR"/html/
|
| |
}
|
| |
|
| |
+ ## return the first artifact path that exists, or the last one otherwise
|
| |
function check_artifact {
|
| |
- # return the artifact if it exists, otherwise the fallback
|
| |
- local ARTIFACT="$1"
|
| |
- local FALLBACK="$2"
|
| |
- if [ -e "$ARTIFACT" ]; then
|
| |
- echo -n "$ARTIFACT"
|
| |
- else
|
| |
- echo -n "$FALLBACK"
|
| |
- fi
|
| |
+ for ARTIFACT in "$@"; do
|
| |
+ if [ -e "$ARTIFACT" ]; then
|
| |
+ echo -n "$ARTIFACT"
|
| |
+ return
|
| |
+ fi
|
| |
+ done
|
| |
+ # no artifact exists, return the last path
|
| |
+ echo -n "${@: -1}"
|
| |
}
|
| |
|
| |
echo 'Running container tests'
|
| |
pushd "$WORKDIR"
|
| |
-
|
| |
- # Install test dependencies if DEPS file exist, otherwise it means that there are no
|
| |
- # additional depenedencies
|
| |
- DEPS="requirements.sh"
|
| |
- TOOLSRC="0"
|
| |
- if [ -e $DEPS ]; then
|
| |
- sh $DEPS
|
| |
- TOOLSRC="$?"
|
| |
- fi
|
| |
-
|
| |
- # If dependencies isntallation didn't fail, run tests via
|
| |
- # make test target (what is expected to exist in each container)
|
| |
- if [ "$TOOLSRC" -eq "0" ]; then
|
| |
- make test
|
| |
- CHECKRC="$?"
|
| |
- if [ "$CHECKRC" -eq "0" ]; then
|
| |
- EXITCODE=0
|
| |
- else
|
| |
- EXITCODE=$MTF_EXIT_FAIL
|
| |
- fi
|
| |
- else
|
| |
- EXITCODE=2
|
| |
- fi
|
| |
+ /usr/share/moduleframework/tools/run_them_containers_taskotron.sh \
|
| |
+ 2>&1 | tee "$RAW_LOG_NAME"
|
| |
+ EXITCODE="${PIPESTATUS[0]}"
|
| |
+ cp "$WORKDIR/$RAW_LOG_NAME" "$ARTIFACTSDIR/$RAW_LOG_NAME"
|
| |
popd
|
| |
|
| |
echo 'Saving container tests results...'
|
| |
@@ -113,5 +97,7 @@
|
| |
--checkname "mtf-containers" \
|
| |
--outcome "$(sed -n 1p "$WORKDIR/outcome.tests")" \
|
| |
--note "$(sed -n 2p "$WORKDIR/outcome.tests")" \
|
| |
- --artifact "$(check_artifact "$ARTIFACTSDIR/avocado-result.tests/html/results.html" "$ARTIFACTSDIR/html/index.html")" \
|
| |
+ --artifact "$(check_artifact "$ARTIFACTSDIR/avocado-result.tests/html/results.html" \
|
| |
+ "$ARTIFACTSDIR/$RAW_LOG_NAME" \
|
| |
+ .)" \
|
| |
--file "$WORKDIR/results.yaml"
|
| |
after PR will be merged https://github.com/fedora-modularity/meta-test-family/pull/176
and package in copr will be regenerated.
this can be merged too
NOT BEFORE