diff --git a/.github/workflows/test_eessi_container_script.yml b/.github/workflows/test_eessi_container_script.yml index c8c2aef47e..0920678c24 100644 --- a/.github/workflows/test_eessi_container_script.yml +++ b/.github/workflows/test_eessi_container_script.yml @@ -25,6 +25,11 @@ jobs: run: | ./install_apptainer_ubuntu.sh + - name: Collect info on test environment + run: | + mount + df -h + - name: Test eessi_container.sh script run: | test_cmd="cat /etc/os-release" @@ -39,13 +44,13 @@ jobs: echo "${test_cmd}" > test_script.sh chmod u+x test_script.sh export SINGULARITY_BIND="$PWD:/test" - ./eessi_container.sh --mode run /test/test_script.sh | tee ${outfile} + ./eessi_container.sh --verbose --mode run /test/test_script.sh | tee ${outfile} grep "${out_pattern}" ${outfile} # test use of --mode shell elif [[ ${{matrix.SCRIPT_TEST}} == 'shell' ]]; then outfile=out_shell.txt - ./eessi_container.sh --mode shell <<< "${test_cmd}" 2>&1 | tee ${outfile} + ./eessi_container.sh --verbose --mode shell <<< "${test_cmd}" 2>&1 | tee ${outfile} grep "${out_pattern}" ${outfile} # test use of --container option, using a totally different container; @@ -53,7 +58,7 @@ jobs: elif [[ ${{matrix.SCRIPT_TEST}} == 'container' ]]; then outfile=out_container.txt container="docker://ghcr.io/eessi/build-node:debian10" - ./eessi_container.sh --container ${container} --mode shell <<< "${test_cmd}" 2>&1 | tee ${outfile} + ./eessi_container.sh --verbose --container ${container} --mode shell <<< "${test_cmd}" 2>&1 | tee ${outfile} grep "Debian GNU/Linux 10" ${outfile} # test use of '--access rw' to get write access in container @@ -63,22 +68,22 @@ jobs: echo "touch /cvmfs/pilot.eessi-hpc.org/${fn}" > test_script.sh chmod u+x test_script.sh export SINGULARITY_BIND="$PWD:/test" - ./eessi_container.sh --access rw --mode run /test/test_script.sh > ${outfile} + ./eessi_container.sh --verbose --access rw --mode run /test/test_script.sh > ${outfile} tmpdir=$(grep "\-\-resume" ${outfile} | sed "s/.*--resume \([^']*\).*/\1/g") # note: must use '--access rw' again here, since touched file is in overlay upper dir - ./eessi_container.sh --resume ${tmpdir} --access rw --mode shell <<< "ls -l /cvmfs/pilot.eessi-hpc.org/${fn}" > ${outfile} + ./eessi_container.sh --verbose --resume ${tmpdir} --access rw --mode shell <<< "ls -l /cvmfs/pilot.eessi-hpc.org/${fn}" > ${outfile} grep "/cvmfs/pilot.eessi-hpc.org/${fn}$" $outfile # test use of --resume elif [[ ${{matrix.SCRIPT_TEST}} == 'resume' ]]; then outfile=out_resume.txt - ./eessi_container.sh --mode shell <<< "${test_cmd}" > ${outfile} + ./eessi_container.sh --verbose --mode shell <<< "${test_cmd}" > ${outfile} tmpdir=$(grep "\-\-resume" ${outfile} | sed "s/.*--resume \([^']*\).*/\1/g") rm -f ${outfile} - ./eessi_container.sh --resume ${tmpdir} --mode shell <<< "${test_cmd}" > ${outfile} + ./eessi_container.sh --verbose --resume ${tmpdir} --mode shell <<< "${test_cmd}" > ${outfile} cat ${outfile} grep "Resuming from previous run using temporary storage at ${tmpdir}" ${outfile} grep "${out_pattern}" ${outfile} @@ -88,10 +93,10 @@ jobs: outfile=out_save.txt fn="test_${RANDOM}.txt" test_cmd="touch /cvmfs/pilot.eessi-hpc.org/${fn}" - ./eessi_container.sh --mode shell --access rw --save test-save.tar <<< "${test_cmd}" 2>&1 | tee ${outfile} + ./eessi_container.sh --verbose --mode shell --access rw --save test-save.tar <<< "${test_cmd}" 2>&1 | tee ${outfile} rm -f ${outfile} - ./eessi_container.sh --mode shell --access rw --resume test-save.tar <<< "ls -l /cvmfs/pilot.eessi-hpc.org/${fn}" > ${outfile} + ./eessi_container.sh --verbose --mode shell --access rw --resume test-save.tar <<< "ls -l /cvmfs/pilot.eessi-hpc.org/${fn}" > ${outfile} grep "/cvmfs/pilot.eessi-hpc.org/${fn}$" $outfile tar tfv test-save.tar | grep "overlay-upper/${fn}"