示例#1
0
文件: dae.py 项目: Katetc/cime
 def __init__(self, case):
 ###########################################################################
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds=False,
                                    run_two_suffix='da',
                                    run_one_description='no data assimilation',
                                    run_two_description='data assimilation')
示例#2
0
文件: nck.py 项目: Katetc/cime
 def __init__(self, case):
     self._comp_classes = []
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = True,
                                    run_two_suffix = 'multiinst',
                                    run_one_description = 'one instance',
                                    run_two_description = 'two instances')
示例#3
0
文件: mcc.py 项目: bertinia/cime
 def __init__(self, case):
     self._comp_classes = []
     self._test_instances = 3
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = True,
                                    run_two_suffix = 'single_instance',
                                    run_two_description = 'single instance',
                                    run_one_description = 'multi driver')
    def __init__(self,
                 case1,
                 run_one_suffix = 'base',
                 run_two_suffix = 'test',
                 case2setup_raises_exception = False,
                 run_one_should_pass = True,
                 run_two_should_pass = True):
        """
        Initialize a SystemTestsCompareTwoFake object

        The core test phases prior to RUN_PHASE are set to TEST_PASS_STATUS;
        RUN_PHASE is left unset (as is any later phase)

        Args:
            case1 (CaseFake): existing case
            run_one_suffix (str, optional): Suffix used for first run. Defaults
                to 'base'. Currently MUST be 'base'.
            run_two_suffix (str, optional): Suffix used for the second run. Defaults to 'test'.
            case2setup_raises_exception (bool, optional): If True, then the call
                to _case_two_setup will raise an exception. Default is False.
            run_one_should_pass (bool, optional): Whether the run_indv method should
                pass for the first run. Default is True, meaning it will pass.
            run_two_should_pass (bool, optional): Whether the run_indv method should
                pass for the second run. Default is True, meaning it will pass.
        """

        self._case2setup_raises_exception = case2setup_raises_exception

        # NOTE(wjs, 2016-08-03) Currently, due to limitations in the test
        # infrastructure, run_one_suffix MUST be 'base'. However, I'm keeping it
        # as an explicit argument to the constructor so that it's easy to relax
        # this requirement later: To relax this assumption, remove the following
        # assertion and add run_one_suffix as an argument to
        # SystemTestsCompareTwo.__init__
        assert(run_one_suffix == 'base')

        SystemTestsCompareTwo.__init__(
            self,
            case1,
            separate_builds = False,
            run_two_suffix = run_two_suffix)

        # Need to tell test status that all phases prior to the run phase have
        # passed, since this is checked in the run call (at least for the build
        # phase status)
        with self._test_status:
            for phase in test_status.CORE_PHASES:
                if phase == test_status.RUN_PHASE:
                    break
                self._test_status.set_status(phase, test_status.TEST_PASS_STATUS)

        self.run_pass_casenames = []
        if run_one_should_pass:
            self.run_pass_casenames.append(self._case1.get_value('CASE'))
        if run_two_should_pass:
            self.run_pass_casenames.append(self._case2.get_value('CASE'))

        self.log = []
示例#5
0
    def __init__(self,
                 case1,
                 run_one_suffix='base',
                 run_two_suffix='test',
                 case2setup_raises_exception=False,
                 run_one_should_pass=True,
                 run_two_should_pass=True):
        """
        Initialize a SystemTestsCompareTwoFake object

        The core test phases prior to RUN_PHASE are set to TEST_PASS_STATUS;
        RUN_PHASE is left unset (as is any later phase)

        Args:
            case1 (CaseFake): existing case
            run_one_suffix (str, optional): Suffix used for first run. Defaults
                to 'base'. Currently MUST be 'base'.
            run_two_suffix (str, optional): Suffix used for the second run. Defaults to 'test'.
            case2setup_raises_exception (bool, optional): If True, then the call
                to _case_two_setup will raise an exception. Default is False.
            run_one_should_pass (bool, optional): Whether the run_indv method should
                pass for the first run. Default is True, meaning it will pass.
            run_two_should_pass (bool, optional): Whether the run_indv method should
                pass for the second run. Default is True, meaning it will pass.
        """

        self._case2setup_raises_exception = case2setup_raises_exception

        # NOTE(wjs, 2016-08-03) Currently, due to limitations in the test
        # infrastructure, run_one_suffix MUST be 'base'. However, I'm keeping it
        # as an explicit argument to the constructor so that it's easy to relax
        # this requirement later: To relax this assumption, remove the following
        # assertion and add run_one_suffix as an argument to
        # SystemTestsCompareTwo.__init__
        assert (run_one_suffix == 'base')

        SystemTestsCompareTwo.__init__(self,
                                       case1,
                                       separate_builds=False,
                                       run_two_suffix=run_two_suffix)

        # Need to tell test status that all phases prior to the run phase have
        # passed, since this is checked in the run call (at least for the build
        # phase status)
        with self._test_status:
            for phase in test_status.CORE_PHASES:
                if phase == test_status.RUN_PHASE:
                    break
                self._test_status.set_status(phase,
                                             test_status.TEST_PASS_STATUS)

        self.run_pass_casenames = []
        if run_one_should_pass:
            self.run_pass_casenames.append(self._case1.get_value('CASE'))
        if run_two_should_pass:
            self.run_pass_casenames.append(self._case2.get_value('CASE'))

        self.log = []
示例#6
0
文件: pet.py 项目: apcraig/cime
 def __init__(self, case):
     """
     initialize a test object
     """
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = False,
                                    run_two_suffix = 'single_thread',
                                    run_one_description = 'default threading',
                                    run_two_description = 'threads set to 1')
示例#7
0
文件: pre.py 项目: apcraig/cime
 def __init__(self, case):
 ###########################################################################
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds=False,
                                    run_two_suffix='pr',
                                    run_one_description='no pause/resume',
                                    run_two_description='pause/resume')
     self._stopopt  = ''
     self._stopn    = 0
示例#8
0
    def __init__(self,
                 case1,
                 run_two_suffix = 'test'):

        SystemTestsCompareTwo.__init__(
            self,
            case1,
            separate_builds = False,
            run_two_suffix = run_two_suffix)
示例#9
0
文件: ncr.py 项目: bertinia/cime
 def __init__(self, case):
     """
     initialize an NCR test
     """
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = True,
                                    run_two_suffix = "singleinst",
                                    run_one_description = "two instances, each with the same number of tasks",
                                    run_two_description = "default build")
示例#10
0
文件: seq.py 项目: bertinia/cime
 def __init__(self, case):
     """
     initialize an object interface to file env_test.xml in the case directory
     """
     SystemTestsCompareTwo.__init__(self,
                                    case,
                                    separate_builds=True,
                                    run_two_suffix="seq",
                                    run_one_description = "base",
                                    run_two_description = "sequence")
示例#11
0
文件: rep.py 项目: Katetc/cime
 def __init__(self, case):
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = False,
                                    run_two_suffix = 'rep2')
示例#12
0
文件: pem.py 项目: bertinia/cime
 def __init__(self, case):
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = True,
                                    run_two_suffix = 'modpes',
                                    run_one_description = 'default pe counts',
                                    run_two_description = 'halved pe counts')
示例#13
0
文件: pea.py 项目: bertinia/cime
 def __init__(self, case):
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = True,
                                    run_two_suffix = 'mpi-serial',
                                    run_one_description = 'default mpi library',
                                    run_two_description = 'mpi-serial')
示例#14
0
 def __init__(self, case):
     SystemTestsCompareTwo.__init__(self, case,
                                    separate_builds = False,
                                    run_two_suffix = 'interp',
                                    run_one_description = 'use_init_interp set to false',
                                    run_two_description = 'use_init_interp set to true')
示例#15
0
文件: pem.py 项目: apcraig/cime
 def __init__(self, case):
     """
     initialize a test object
     """
     SystemTestsCompareTwo.__init__(self, case, True)