diff --git a/reg_tests/executeAerodiskRegressionCase.py b/reg_tests/executeAerodiskRegressionCase.py index ae1dcd5eec..06b8624c88 100644 --- a/reg_tests/executeAerodiskRegressionCase.py +++ b/reg_tests/executeAerodiskRegressionCase.py @@ -88,7 +88,8 @@ if not os.path.isdir(inputsDirectory): rtl.exitWithError("The test data inputs directory, {}, does not exist. Verify your local repository is up to date.".format(inputsDirectory)) -rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'adsk_driver.outb':'adsk_driver_ref.outb'}) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'adsk_driver.outb':'adsk_driver_ref.outb'}) ### Run aerodisk on the test case if not noExec: diff --git a/reg_tests/executeAerodynPyRegressionCase.py b/reg_tests/executeAerodynPyRegressionCase.py index e9de4f3bb0..66bcb3c233 100644 --- a/reg_tests/executeAerodynPyRegressionCase.py +++ b/reg_tests/executeAerodynPyRegressionCase.py @@ -90,7 +90,8 @@ # create the local output directory and initialize it with input files -rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'py_ad_driver.out':'py_ad_driver_ref.out'}) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'py_ad_driver.out':'py_ad_driver_ref.out'}) # , excludeExt=['.out','.outb']) ### Run aerodyn on the test case diff --git a/reg_tests/executeAerodynRegressionCase.py b/reg_tests/executeAerodynRegressionCase.py index 3c6cbeac8f..30fe3c2b90 100644 --- a/reg_tests/executeAerodynRegressionCase.py +++ b/reg_tests/executeAerodynRegressionCase.py @@ -92,16 +92,12 @@ # Special case, copy the BAR Baseline files dst = os.path.join(buildDirectory, "BAR_Baseline") src = os.path.join(moduleDirectory, "BAR_Baseline") -try: +if not os.path.isdir(dst): rtl.copyTree(src, dst) -except: - # This can fail if two processes are copying the file at the same time - print('>>> Copy failed') - import time - time.sleep(1) # create the local output directory and initialize it with input files -rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'ad_driver.outb':'ad_driver_ref.outb'}) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'ad_driver.outb':'ad_driver_ref.outb'}) # , excludeExt=['.out','.outb']) ### Run aerodyn on the test case diff --git a/reg_tests/executeHydrodynPyRegressionCase.py b/reg_tests/executeHydrodynPyRegressionCase.py index 56cf5a8bf3..d121932b6f 100644 --- a/reg_tests/executeHydrodynPyRegressionCase.py +++ b/reg_tests/executeHydrodynPyRegressionCase.py @@ -90,7 +90,8 @@ # create the local output directory and initialize it with input files -rtl.copyTree(inputsDirectory, testBuildDirectory) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory) # , excludeExt=['.out','.outb']) ### Run HydroDyn on the test case diff --git a/reg_tests/executeMoordynPyRegressionCase.py b/reg_tests/executeMoordynPyRegressionCase.py index 0f43de1e66..912d90d2fd 100644 --- a/reg_tests/executeMoordynPyRegressionCase.py +++ b/reg_tests/executeMoordynPyRegressionCase.py @@ -90,7 +90,8 @@ rtl.exitWithError("The test data inputs directory, {}, does not exist. Verify your local repository is up to date.".format(inputsDirectory)) # create the local output directory and initialize it with input files -rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'MD.out':'MD_ref.out','MDroot.MD.out':'MDroot.MD_ref.out'}) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'MD.out':'MD_ref.out','MDroot.MD.out':'MDroot.MD_ref.out'}) # , excludeExt=['.out','.outb']) ### Run MoorDyn on the test case diff --git a/reg_tests/executeOpenfastLinearRegressionCase.py b/reg_tests/executeOpenfastLinearRegressionCase.py index 91f43062b3..c5bb641041 100644 --- a/reg_tests/executeOpenfastLinearRegressionCase.py +++ b/reg_tests/executeOpenfastLinearRegressionCase.py @@ -163,8 +163,8 @@ def indent(msg, sindent='\t'): shutil.copy2(srcname, dstname) # # Copying the actual test directory -# if not os.path.isdir(testBuildDirectory): -rtl.copyTree(inputsDirectory, testBuildDirectory, excludeExt=excludeExt, renameExtDict={'.lin':'.ref_lin'}) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, excludeExt=excludeExt, renameExtDict={'.lin':'.ref_lin'}) ### Run openfast on the test case if not noExec: diff --git a/reg_tests/executeSimpleElastodynRegressionCase.py b/reg_tests/executeSimpleElastodynRegressionCase.py index e271872574..a5232038b4 100644 --- a/reg_tests/executeSimpleElastodynRegressionCase.py +++ b/reg_tests/executeSimpleElastodynRegressionCase.py @@ -88,7 +88,8 @@ if not os.path.isdir(inputsDirectory): rtl.exitWithError("The test data inputs directory, {}, does not exist. Verify your local repository is up to date.".format(inputsDirectory)) -rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'sed_driver.outb':'sed_driver_ref.outb'}) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict={'sed_driver.outb':'sed_driver_ref.outb'}) ### Run SED on the test case if not noExec: diff --git a/reg_tests/executeSubdynRegressionCase.py b/reg_tests/executeSubdynRegressionCase.py index 04363472d4..ef96940713 100644 --- a/reg_tests/executeSubdynRegressionCase.py +++ b/reg_tests/executeSubdynRegressionCase.py @@ -89,7 +89,8 @@ rtl.exitWithError("The test data inputs directory, {}, does not exist. Verify your local repository is up to date.".format(inputsDirectory)) # create the local output directory and initialize it with input files (overwrite if exists) -rtl.copyTree(inputsDirectory, testBuildDirectory, renameExtDict={'.out':'_ref.out'}, includeExt=['.dvr','.dat','.out','.csv']) +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, renameExtDict={'.out':'_ref.out'}, includeExt=['.dvr','.dat','.out','.csv']) ### Run SubDyn on the test case diff --git a/reg_tests/executeUnsteadyAeroRegressionCase.py b/reg_tests/executeUnsteadyAeroRegressionCase.py index 53c8bf567e..94a11e613f 100644 --- a/reg_tests/executeUnsteadyAeroRegressionCase.py +++ b/reg_tests/executeUnsteadyAeroRegressionCase.py @@ -92,7 +92,8 @@ # create the local output directory and initialize it with input files renameDict={'UA'+str(i)+'.outb':'UA'+str(i)+'_ref.outb' for i in [2,3,4,5,6,7]} -rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict=renameDict +if not os.path.isdir(testBuildDirectory): + rtl.copyTree(inputsDirectory, testBuildDirectory, renameDict=renameDict , excludeExt=['.sum']) # , excludeExt=['.out','.outb','.sum'])