From aa9c4dc53d40bb5ff7a4ca19f8cbeab3ae35c3f7 Mon Sep 17 00:00:00 2001 From: Jim Edwards Date: Tue, 16 Aug 2016 13:27:31 -0600 Subject: [PATCH] add timestamp to testcase names --- utils/python/CIME/XML/env_batch.py | 2 +- utils/python/tests/scripts_regression_tests.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/utils/python/CIME/XML/env_batch.py b/utils/python/CIME/XML/env_batch.py index 581610d01848..be78beadba48 100644 --- a/utils/python/CIME/XML/env_batch.py +++ b/utils/python/CIME/XML/env_batch.py @@ -331,7 +331,7 @@ def get_submit_args(self, case, job): submitargs+=" %s"%flag else: if name.startswith("$"): - name = name[:1] + name = name[1:] val = case.get_value(name,subgroup=job) if val is None: val = case.get_resolved_value(name) diff --git a/utils/python/tests/scripts_regression_tests.py b/utils/python/tests/scripts_regression_tests.py index 7a332986cbff..62c516494e97 100755 --- a/utils/python/tests/scripts_regression_tests.py +++ b/utils/python/tests/scripts_regression_tests.py @@ -121,7 +121,7 @@ def setUp(self): self._do_teardown = [] def test_createnewcase(self): - testdir = os.path.join(self._testroot, 'scripts_regression_tests.testcreatenewcase') + testdir = os.path.join(self._testroot, 'scripts_regression_tests.testcreatenewcase.%s'% CIME.utils.get_utc_timestamp()) if os.path.exists(testdir): shutil.rmtree(testdir) self._testdirs.append(testdir) @@ -137,7 +137,7 @@ def test_createnewcase(self): self._do_teardown.append(testdir) def test_user_mods(self): - testdir = os.path.join(self._testroot, 'scripts_regression_tests.testusermods') + testdir = os.path.join(self._testroot, 'scripts_regression_tests.testusermods.%s'% CIME.utils.get_utc_timestamp()) if os.path.exists(testdir): shutil.rmtree(testdir) self._testdirs.append(testdir) @@ -169,10 +169,10 @@ class M_TestWaitForTests(unittest.TestCase): def setUp(self): ########################################################################### self._testroot = MACHINE.get_value("CESMSCRATCHROOT") - self._testdir_all_pass = os.path.join(self._testroot, 'scripts_regression_tests.testdir_all_pass') - self._testdir_with_fail = os.path.join(self._testroot, 'scripts_regression_tests.testdir_with_fail') - self._testdir_unfinished = os.path.join(self._testroot, 'scripts_regression_tests.testdir_unfinished') - self._testdir_unfinished2 = os.path.join(self._testroot, 'scripts_regression_tests.testdir_unfinished2') + self._testdir_all_pass = os.path.join(self._testroot, 'scripts_regression_tests.testdir_all_pass.%s'% CIME.utils.get_utc_timestamp()) + self._testdir_with_fail = os.path.join(self._testroot, 'scripts_regression_tests.testdir_with_fail.%s'% CIME.utils.get_utc_timestamp()) + self._testdir_unfinished = os.path.join(self._testroot, 'scripts_regression_tests.testdir_unfinished.%s'% CIME.utils.get_utc_timestamp()) + self._testdir_unfinished2 = os.path.join(self._testroot, 'scripts_regression_tests.testdir_unfinished2.%s'% CIME.utils.get_utc_timestamp()) testdirs = [self._testdir_all_pass, self._testdir_with_fail, self._testdir_unfinished, self._testdir_unfinished2] for testdir in testdirs: if os.path.exists(testdir): @@ -964,7 +964,7 @@ def setUp(self): self._testdirs = [] self._do_teardown = [] - testdir = os.path.join(self._testroot, 'scripts_regression_tests.testscripts') + testdir = os.path.join(self._testroot, 'scripts_regression_tests.testscripts.%s'% CIME.utils.get_utc_timestamp()) machine = 'melvin' if os.path.exists(testdir): shutil.rmtree(testdir)