def test_processflow_from_scratch_yes_sta(self):
     """
     End to end test from scrath with no sta
     """
     print '\n'
     print_message(
         '---- Starting Test: {} ----'.format(inspect.stack()[0][3]), 'ok')
     config_path = os.path.join(os.getcwd(), 'tests', 'test_configs',
                                'test_processflow_with_inplace_data.cfg')
     output_path = os.path.join('/export/baldwin32/jenkins/workspace/',
                                inspect.stack()[0][3], 'output')
     input_path = os.path.join('/export/baldwin32/jenkins/workspace/',
                               inspect.stack()[0][3], 'input')
     if os.path.exists(output_path):
         print "removing previous output directory"
         shutil.rmtree(output_path)
     if os.path.exists(input_path):
         print "removing previous input directory"
         shutil.rmtree(input_path)
     print "---- project cleanup complete ----"
     testargs = [
         '-c', config_path, '-n', '-f', '-r', './resources', '-o',
         output_path, '-i', input_path, '-d'
     ]
     ret = main(test=True, testargs=testargs)
     self.assertEqual(ret, 0)
    def test_processflow_with_inplace_data(self):
        config_path = os.path.join(
            os.getcwd(), 'tests', 'test_no_sta_minimal.cfg')

        config = ConfigObj(config_path)
        project_path = config['global']['project_path']
        if os.path.exists(os.path.join(project_path, 'input')):
            print 'testing with inplace data'
            testargs = ['-c', config_path, '-n', '-f']
            ret = main(test=True, testargs=testargs)
            self.assertEqual(ret, 0)
        else:
            print 'data not yet produced, skipping inplace data check'
    def test_processflow_from_scratch_yes_sta(self):
        config_path = os.path.join(
            os.getcwd(), 'tests', 'test_yes_sta_minimal.cfg')

        config = ConfigObj(config_path)
        project_path = config['global']['project_path']
        if os.path.exists(project_path):
            print "removing previous project directory"
            shutil.rmtree(project_path, ignore_errors=True)
            print "project cleanup complete"
        testargs = ['-c', config_path, '-n', '-f']
        ret = main(test=True, testargs=testargs)
        self.assertEqual(ret, 0)
Esempio n. 4
0
    def test_processflow_with_inplace_data(self):
        """
        End to end test of the processflow with inplace data
        """
        print '\n'
        print_message(
            '---- Starting Test: {} ----'.format(inspect.stack()[0][3]), 'ok')
        config_path = os.path.join(os.getcwd(), 'tests', 'test_configs',
                                   'test_amwg_complete.cfg')

        config = ConfigObj(config_path)
        testargs = ['-c', config_path, '-r', 'resources', '--dryrun']
        ret = main(test=True, testargs=testargs)
        self.assertEqual(ret, 0)