@@ -480,6 +480,7 @@ class BashWrapperBuilderTest extends Specification {
480480 binding. task_env == ' export FOO="aa"\n export BAR="bb"\n '
481481 binding. container_env == null
482482 ! binding. launch_cmd. contains(' nxf_container_env' )
483+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
483484 }
484485
485486 def ' should create secret env' () {
@@ -839,7 +840,7 @@ class BashWrapperBuilderTest extends Specification {
839840 sarus run --mount=type=bind,source=/work/dir,destination=/work/dir -w "$PWD" busybox /bin/bash -ue /work/dir/.command.sh
840841 ''' . stripIndent(). rightTrim()
841842 binding. cleanup_cmd == " "
842- binding. kill_cmd == ' [[ "$pid" ]] && kill $pid 2>/dev/null '
843+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
843844 }
844845
845846 def ' should create wrapper with sarus and environment' () {
@@ -856,7 +857,7 @@ class BashWrapperBuilderTest extends Specification {
856857 sarus run --mount=type=bind,source=/work/dir,destination=/work/dir -w "$PWD" busybox /bin/bash -c "eval $(nxf_container_env); /bin/bash -ue /work/dir/.command.sh"
857858 ''' . stripIndent(). rightTrim()
858859 binding. cleanup_cmd == " "
859- binding. kill_cmd == ' [[ "$pid" ]] && kill $pid 2>/dev/null '
860+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
860861 and :
861862 binding. container_env == ''' \
862863 nxf_container_env() {
@@ -881,7 +882,7 @@ class BashWrapperBuilderTest extends Specification {
881882 sarus run --mount=type=bind,source=/folder\\ with\\ blanks,destination=/folder\\ with\\ blanks --mount=type=bind,source=/work/dir,destination=/work/dir -w "$PWD" busybox /bin/bash -ue /work/dir/.command.sh
882883 ''' . stripIndent(). rightTrim()
883884 binding. cleanup_cmd == " "
884- binding. kill_cmd == ' [[ "$pid" ]] && kill $pid 2>/dev/null '
885+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
885886 }
886887
887888 def ' should create wrapper with sarus container custom options' () {
@@ -898,7 +899,7 @@ class BashWrapperBuilderTest extends Specification {
898899 sarus run --mount=type=bind,source=/work/dir,destination=/work/dir -w "$PWD" --mount=type=bind,source=/foo,destination=/bar busybox /bin/bash -ue /work/dir/.command.sh
899900 ''' . stripIndent(). rightTrim()
900901 binding. cleanup_cmd == " "
901- binding. kill_cmd == ' [[ "$pid" ]] && kill $pid 2>/dev/null '
902+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
902903 }
903904
904905 def ' should create wrapper with shifter' () {
@@ -921,7 +922,7 @@ class BashWrapperBuilderTest extends Specification {
921922 shifter --image docker://ubuntu:latest /bin/bash -c "eval $(nxf_container_env); /bin/bash -ue /work/dir/.command.sh"
922923 ''' . stripIndent(). rightTrim()
923924 binding. cleanup_cmd == " "
924- binding. kill_cmd == ' [[ "$pid" ]] && kill $pid 2>/dev/null '
925+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
925926
926927 }
927928
@@ -936,7 +937,7 @@ class BashWrapperBuilderTest extends Specification {
936937 then :
937938 binding. launch_cmd == ' set +u; env - PATH="$PATH" ${TMP:+SINGULARITYENV_TMP="$TMP"} ${TMPDIR:+SINGULARITYENV_TMPDIR="$TMPDIR"} singularity exec docker://ubuntu:latest /bin/bash -c "cd $PWD; eval $(nxf_container_env); /bin/bash -ue /work/dir/.command.sh"'
938939 binding. cleanup_cmd == " "
939- binding. kill_cmd == ' [[ "$pid" ]] && kill $pid 2>/dev/null '
940+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
940941 }
941942
942943 def ' should create wrapper with singularity legacy entry' () {
@@ -950,7 +951,7 @@ class BashWrapperBuilderTest extends Specification {
950951 then :
951952 binding. launch_cmd == ' set +u; env - PATH="$PATH" ${TMP:+SINGULARITYENV_TMP="$TMP"} ${TMPDIR:+SINGULARITYENV_TMPDIR="$TMPDIR"} singularity exec docker://ubuntu:latest /bin/bash -c "cd $PWD; eval $(nxf_container_env); /bin/bash -ue /work/dir/.command.sh"'
952953 binding. cleanup_cmd == " "
953- binding. kill_cmd == ' [[ "$pid" ]] && kill $pid 2>/dev/null '
954+ binding. kill_cmd == ' [[ "$pid" ]] && nxf_kill $pid'
954955 }
955956
956957 def ' should create task and container env' () {
0 commit comments