Skip to content

Commit 4bd2dd3

Browse files
author
efajardo
committed
Mounting the cvmfs singularity manually
1 parent e3db603 commit 4bd2dd3

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

osgtest/tests/test_60_singularity.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,23 @@ class TestSingularity(osgunittest.OSGTestCase):
99
__check_path = '/cvmfs/cms.cern.ch/cmsset_default.sh'
1010
__cvmfs_image = '/cvmfs/singularity.opensciencegrid.org/opensciencegrid/osg-wn:3.3-el6'
1111

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+
1223
def test_01_singularity(self):
1324
core.skip_ok_unless_installed('singularity-runtime')
1425
core.skip_ok_unless_installed('cvmfs')
26+
singularity_repo = 'singularity.opensciencegrid.org'
27+
if core.el_release() <= 6:
28+
mountSingularityCVMFSRepo(self, singularity_repo)
1529
core.state['cvmfs.mounted'] = False
1630

1731
command = ('ls', '/cvmfs')
@@ -20,7 +34,6 @@ def test_01_singularity(self):
2034
self.assert_(file_exists, 'Cvmfs mount point missing')
2135
core.state['cvmfs.mounted'] = True
2236

23-
singularity_repo = 'singularity.opensciencegrid.org'
2437
command = ('ls', '/cvmfs/' + singularity_repo)
2538
status, stdout, stderr = core.system(command, False)
2639

0 commit comments

Comments
 (0)