X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=run-csit.sh;h=52d169327df713422e3060669bdc00fa4767a976;hb=refs%2Fheads%2Fguilin;hp=634b0c7c8000a94efca37b39266ba03d8c1329e3;hpb=bc1a21cf53f0c6653eb31c953256fc5322877481;p=integration%2Fcsit.git diff --git a/run-csit.sh b/run-csit.sh index 634b0c7c..52d16932 100755 --- a/run-csit.sh +++ b/run-csit.sh @@ -24,14 +24,16 @@ function on_exit(){ rc=$? - rsync -av "$WORKDIR/" "$WORKSPACE/archives" - - # Record list of active docker containers - docker ps --format "{{.Image}}" > "$WORKSPACE/archives/_docker-images.log" - - # show memory consumption after all docker instances initialized - docker_stats | tee "$WORKSPACE/archives/_sysinfo-2-after-robot.txt" - + if [[ ${WORKSPACE} ]]; then + if [[ ${WORKDIR} ]]; then + rsync -av "$WORKDIR/" "$WORKSPACE/archives" + fi + # Record list of active docker containers + docker ps --format "{{.Image}}" > "$WORKSPACE/archives/_docker-images.log" + + # show memory consumption after all docker instances initialized + docker_stats | tee "$WORKSPACE/archives/_sysinfo-2-after-robot.txt" + fi # Run teardown script plan if it exists cd "${TESTPLANDIR}" TEARDOWN="${TESTPLANDIR}/teardown.sh"