コード例 #1
0
ファイル: TestMassStorageWN.py プロジェクト: pseyfert/ganga
    def test_e_MultipleFiles(self):
        """Test that the wildcards work"""

        from Ganga.GPI import LocalFile, MassStorageFile, Job, ArgSplitter

        _ext = '.root'
        _ext2 = '.txt'
        file_1 = generate_unique_temp_file(_ext)
        file_2 = generate_unique_temp_file(_ext)
        file_3 = generate_unique_temp_file(_ext2)
        TestMassStorageWN._managed_files.append(file_1)
        TestMassStorageWN._managed_files.append(file_2)
        TestMassStorageWN._managed_files.append(file_3)

        j = Job()
        j.inputfiles = [
            LocalFile(file_1),
            LocalFile(file_2),
            LocalFile(file_3)
        ]
        j.splitter = ArgSplitter(
            args=[[_] for _ in range(0, TestMassStorageWN.sj_len)])
        j.outputfiles = [
            MassStorageFile(namePattern='*' + _ext,
                            outputfilenameformat='{jid}/{sjid}/{fname}'),
            MassStorageFile(namePattern='*' + _ext2)
        ]
        j.submit()
コード例 #2
0
ファイル: TestSJIDName.py プロジェクト: wireshark10/ganga
    def test_c_onlyCreate(self):
        """here for testing job create"""
        from Ganga.GPI import Job, Executable, ArgSplitter, MassStorageFile

        j = Job()
        j.application = Executable(exe='touch')
        j.splitter = ArgSplitter(args=[['abc.txt'], ['def.txt']])
        j.outputfiles = [
            MassStorageFile(outputfilenameformat='/test/{sjid}-{fname}',
                            namePattern='*.txt')
        ]
コード例 #3
0
ファイル: TestSJIDName.py プロジェクト: wireshark10/ganga
    def test_a_jobSubmit(self):
        """here for testing a submit"""
        from Ganga.GPI import Job, Executable, ArgSplitter, MassStorageFile

        j = Job()
        j.application = Executable(exe='touch')
        j.splitter = ArgSplitter(args=[['abc.txt'], ['def.txt']])
        j.outputfiles = [
            MassStorageFile(outputfilenameformat='/test/{sjid}-{fname}',
                            namePattern='*.txt')
        ]
        j.submit()

        from GangaTest.Framework.utils import sleep_until_completed
        sleep_until_completed(j)
コード例 #4
0
ファイル: TestMassStorageWN.py プロジェクト: pseyfert/ganga
    def test_a_Submit(self):
        """Test the ability to submit a job with some LocalFiles"""
        from Ganga.GPI import jobs, Job, LocalFile, MassStorageFile

        TestMassStorageWN.cleanUp()

        _ext = '.txt'

        file_1 = generate_unique_temp_file(_ext)
        TestMassStorageWN._managed_files.append(file_1)

        j = Job()
        j.inputfiles = [LocalFile(file_1)]
        j.outputfiles = [
            MassStorageFile(namePattern='*' + _ext,
                            outputfilenameformat='{jid}/{fname}')
        ]
        j.submit()
コード例 #5
0
ファイル: TestMassStorageWN.py プロジェクト: pseyfert/ganga
    def test_c_SplitJob(self):
        """Test submitting subjobs"""
        from Ganga.GPI import Job, LocalFile, MassStorageFile, ArgSplitter

        _ext = '.txt2'

        file_1 = generate_unique_temp_file(_ext)
        TestMassStorageWN._managed_files.append(file_1)

        j = Job()
        j.inputfiles = [LocalFile(file_1)]
        j.splitter = ArgSplitter(
            args=[[_] for _ in range(0, TestMassStorageWN.sj_len)])
        j.outputfiles = [
            MassStorageFile(namePattern='*' + _ext,
                            outputfilenameformat='{jid}/{sjid}/{fname}')
        ]
        j.submit()
コード例 #6
0
    def test_a_testClientSideSubmit(self):
        """Test the client side code whilst stil using the Local backend"""

        from Ganga.GPI import LocalFile, MassStorageFile, Job, ArgSplitter

        from Ganga.Utility.Config import getConfig

        TestMassStorageClient.cleanUp()

        assert getConfig('Output')['MassStorageFile']['backendPostprocess'][
            'Local'] == 'client'

        _ext = '.root'
        file_1 = generate_unique_temp_file(_ext)
        file_2 = generate_unique_temp_file(_ext)
        TestMassStorageClient._managed_files.append(file_1)
        TestMassStorageClient._managed_files.append(file_2)

        j = Job()
        j.inputfiles = [LocalFile(file_1), LocalFile(file_2)]
        j.splitter = ArgSplitter(
            args=[[_] for _ in range(0, TestMassStorageClient.sj_len)])
        j.outputfiles = [MassStorageFile(namePattern='*' + _ext)]
        j.submit()