diff --git a/Testing/SystemTests/lib/systemtests/stresstesting.py b/Testing/SystemTests/lib/systemtests/stresstesting.py index 4e1237baf7fb367057bf1700d6050b4077b6991a..6a1e04402385f01dd2a5355a806fa6e2412b062d 100644 --- a/Testing/SystemTests/lib/systemtests/stresstesting.py +++ b/Testing/SystemTests/lib/systemtests/stresstesting.py @@ -72,14 +72,14 @@ class MantidStressTest(unittest.TestCase): from mantid.kernel import MemoryStats self.memory = MemoryStats().residentMem()/1024 - def setSearchSaveDirectories(self, core_id, searchDir, saveDir): + def setSearchSaveDirectories(self, core_id, saveDir): + ''' + Modify the defaultsave.directory to a path specific to each thread + ''' from mantid.kernel import config config['datasearch.directories'] += "/core-%i" % (core_id) config['defaultsave.directory'] = "%s/core-%i" % (saveDir,core_id) sys.path.insert(0, config['defaultsave.directory']) - # print("in here") - # print(config['datasearch.directories']) - # print(config['defaultsave.directory']) return def runTest(self): @@ -632,8 +632,7 @@ class TestRunner(object): exec_call += ' ' + self._exec_args # write script to temporary file and execute this file tmp_file = tempfile.NamedTemporaryFile(mode='w', delete=False) - tmp_file.write(script.asString(clean=self._clean, core_id=self._core_id, - searchDir=self._searchDir, saveDir=self._saveDir)) + tmp_file.write(script.asString(clean=self._clean, core_id=self._core_id, saveDir=self._saveDir)) tmp_file.close() cmd = exec_call + ' ' + tmp_file.name results = self.spawnSubProcess(cmd) @@ -657,7 +656,7 @@ class TestScript(object): ("sys.path.append('%s')\n" % self._test_dir) + \ ("from %s import %s\n" % (self._modname, self._test_cls_name)) + \ ("systest = %s()\n" % self._test_cls_name) + \ - ("systest.setSearchSaveDirectories(%i,'%s','%s')\n" % (core_id, searchDir, saveDir)) + \ + ("systest.setSearchSaveDirectories(%i,'%s')\n" % (core_id, saveDir)) + \ ("if %r:\n" % self._exclude_in_pr_builds) + \ (" systest.excludeInPullRequests = lambda: False\n") if (not clean): @@ -1013,19 +1012,16 @@ class MantidFrameworkConfig: def __moveFile(self, src, dst): if os.path.exists(src): - # import shutil shutil.move(src, dst) def __copyFile(self, src, dst): if os.path.exists(src): - # import shutil shutil.copyfile(src, dst) saveDir = property(lambda self: self.__saveDir) testDir = property(lambda self: self.__testDir) dataDir = property(lambda self: self.__dataDirs) - def config(self): # Start mantid diff --git a/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py b/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py index 247326655134120180783feeac8f339aec2d550d..38fac795f8023eb44376b09eb2546f2ebc8e6546 100644 --- a/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py +++ b/Testing/SystemTests/tests/analysis/ISISDirectReductionComponents.py @@ -25,26 +25,17 @@ class ISIS_ReductionWebLike(stresstesting.MantidStressTest): self.rd.def_main_properties() self.rd.def_advanced_properties() - # save_folder = config['defaultsave.directory'] - - # self.rd.save_web_variables(os.path.join(save_folder,'reduce_vars13.py')) - def runTest(self): save_folder = config['defaultsave.directory'] self.rd.save_web_variables(os.path.join(save_folder,'reduce_vars.py')) # run reduction using saved variables like web variables web_var_folder = config['defaultsave.directory'] - print("NVAYTET1",web_var_folder) sys.path.insert(0,web_var_folder) - print("NVAYTET2",web_var_folder) reload(mr) # change these variables to save result as nxs workspace - print("NVAYTET3",mr) run_dir = os.path.dirname(os.path.realpath(__file__)) - print("NEIL",run_dir) - # exit() mr.web_var.advanced_vars['save_format']='nxs' # web services currently needs input file to be defined input_file = 'MAR11001.RAW' diff --git a/scripts/Diffraction/isis_powder/routines/focus.py b/scripts/Diffraction/isis_powder/routines/focus.py index 5540b12bc2c7548a174e6c54b7d9326332ae2053..ae7eda231e8a8175d2e49eace35c4e883de21a64 100644 --- a/scripts/Diffraction/isis_powder/routines/focus.py +++ b/scripts/Diffraction/isis_powder/routines/focus.py @@ -99,7 +99,6 @@ def _batched_run_focusing(instrument, perform_vanadium_norm, run_number_string, read_ws_list = common.load_current_normalised_ws_list(run_number_string=run_number_string, instrument=instrument) run_details = instrument._get_run_details(run_number_string=run_number_string) - print("NVAYTET 5",run_details.splined_vanadium_file_path) vanadium_splines = None if perform_vanadium_norm: vanadium_splines = mantid.LoadNexus(Filename=run_details.splined_vanadium_file_path) diff --git a/scripts/Inelastic/Direct/ReductionWrapper.py b/scripts/Inelastic/Direct/ReductionWrapper.py index 4bb977f0f01593f674c66558aa1feecb3e850776..4d233fedf1ff18e9f9d7a037b1664f515e603169 100644 --- a/scripts/Inelastic/Direct/ReductionWrapper.py +++ b/scripts/Inelastic/Direct/ReductionWrapper.py @@ -118,10 +118,6 @@ class ReductionWrapper(object): if not FileName: FileName = 'reduce_vars.py' - # FileName = 'reduce_vars11.py' - run_dir = os.path.dirname(os.path.realpath(__file__)) - print("NEIL11",run_dir) - f = open(FileName,'w') f.write("standard_vars = {\n") str_wrapper = ' '