@@ -9,9 +9,23 @@ class TestSingularity(osgunittest.OSGTestCase):
9
9
__check_path = '/cvmfs/cms.cern.ch/cmsset_default.sh'
10
10
__cvmfs_image = '/cvmfs/singularity.opensciencegrid.org/opensciencegrid/osg-wn:3.3-el6'
11
11
12
+ def mountSingularityCVMFSRepo (self , repo ):
13
+ command = ('mkdir' , '-p' , 'singularity.opensciencegrid.org' )
14
+ status , stdout , stderr = core .system (command , False )
15
+ if status != 0 :
16
+ self .fail ("failed to mkdir /cvmfs/%s" % repo )
17
+
18
+ command = ('mount' , '-t' , 'cvmfs' , 'repo' , '/cvmfs/' + repo )
19
+ if status != 0 :
20
+ self .fail ("failed to mount" % repo )
21
+
22
+
12
23
def test_01_singularity (self ):
13
24
core .skip_ok_unless_installed ('singularity-runtime' )
14
25
core .skip_ok_unless_installed ('cvmfs' )
26
+ singularity_repo = 'singularity.opensciencegrid.org'
27
+ if core .el_release () <= 6 :
28
+ mountSingularityCVMFSRepo (self , singularity_repo )
15
29
core .state ['cvmfs.mounted' ] = False
16
30
17
31
command = ('ls' , '/cvmfs' )
@@ -20,7 +34,6 @@ def test_01_singularity(self):
20
34
self .assert_ (file_exists , 'Cvmfs mount point missing' )
21
35
core .state ['cvmfs.mounted' ] = True
22
36
23
- singularity_repo = 'singularity.opensciencegrid.org'
24
37
command = ('ls' , '/cvmfs/' + singularity_repo )
25
38
status , stdout , stderr = core .system (command , False )
26
39
0 commit comments