@@ -229,7 +229,7 @@ def test_end2end_singularity_image(self):
229229 "^== Singularity tool found at %s/bin/singularity" % self .test_prefix ,
230230 "^== Singularity version '2.4.0' is 2.4 or higher ... OK" ,
231231 "^== Singularity definition file created at %s/containers/Singularity\.toy-0.0" % self .test_prefix ,
232- "^== Running 'sudo . */singularity build\s*/.* /.*', you may need to enter your 'sudo' password..." ,
232+ "^== Running 'sudo\s*\S */singularity build\s*/.* /.*', you may need to enter your 'sudo' password..." ,
233233 "^== Singularity image created at %s/containers/toy-0.0\.simg" % self .test_prefix ,
234234 ]
235235 self .check_regexs (regexs , stdout )
@@ -246,7 +246,7 @@ def test_end2end_singularity_image(self):
246246 stdout , stderr = self .run_main (args )
247247 self .assertFalse (stderr )
248248 regexs [- 3 ] = "^== Singularity definition file created at %s/containers/Singularity\.foo-bar" % self .test_prefix
249- regexs [- 2 ] = "^== Running 'sudo . */singularity build --writable /.* /.*', you may need to enter .*"
249+ regexs [- 2 ] = "^== Running 'sudo\s*\S */singularity build --writable /.* /.*', you may need to enter .*"
250250 regexs [- 1 ] = "^== Singularity image created at %s/containers/foo-bar\.img$" % self .test_prefix
251251 self .check_regexs (regexs , stdout )
252252
@@ -277,6 +277,13 @@ def test_end2end_singularity_image(self):
277277 self .assertFalse (stderr )
278278 self .check_regexs (regexs , stdout )
279279
280+ # test use of --container-tmpdir
281+ args .append ('--container-tmpdir=%s' % self .test_prefix )
282+ stdout , stderr = self .run_main (args )
283+ self .assertFalse (stderr )
284+ regexs [- 3 ] = "^== Running 'sudo\s*SINGULARITY_TMPDIR=%s \S*/singularity build .*" % self .test_prefix
285+ self .check_regexs (regexs , stdout )
286+
280287
281288def suite ():
282289 """ returns all the testcases in this module """
0 commit comments