Skip to content

Commit

Permalink
Re #11946 Fixing Mary system test for waiting for files
Browse files Browse the repository at this point in the history
  • Loading branch information
abuts committed Oct 27, 2015
1 parent 1b64449 commit 4aaebe6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Testing/SystemTests/tests/analysis/ISISDirectInelastic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pylint: disable=no-init
#pylint: disable=no-init
import stresstesting
from mantid.simpleapi import *
from mantid.api import Workspace
Expand Down Expand Up @@ -120,15 +120,15 @@ def prepare_test_file(self):
"""
self._counter+=1
if self._counter == 2:
source = FileFinder.findRuns('11001')[0]
source = FileFinder.findRuns('MAR11001')[0]
targ_path = config['defaultsave.directory']
targ_file = os.path.join(targ_path,'MAR11002.nxs')
shutil.copy2(source ,targ_file )
self._file_to_clear = targ_file
if self._counter>= 3:
if os.path.exists(self._file_to_clear):
os.remove(self._file_to_clear)
source = FileFinder.findRuns('11001')[0]
source = FileFinder.findRuns('MAR11001')[0]
targ_path = config['defaultsave.directory']
targ_file = os.path.join(targ_path,'MAR11002.raw')
shutil.copy2(source ,targ_file )
Expand Down
4 changes: 2 additions & 2 deletions Testing/SystemTests/tests/analysis/ISIS_MariReduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,8 +309,8 @@ def __init__(self,web_var=None):
#config['defaultsave.directory'] = result_dir # folder to save resulting spe/nxspe files. Defaults are in

# execute stuff from Mantid
#rd = ReduceMARIFromFile()
rd= ReduceMARIMon2Norm()
rd = ReduceMARIFromFile()
#rd= ReduceMARIMon2Norm()
#rd = ReduceMARIMonitorsSeparate()
#rd = ReduceMARIFromWorkspace()
rd.def_advanced_properties()
Expand Down
6 changes: 3 additions & 3 deletions scripts/Inelastic/Direct/ReductionWrapper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#pylint: disable=invalid-name
#pylint: disable=invalid-name
from mantid.simpleapi import *
from mantid import config,api
from mantid.kernel import funcreturns
Expand Down Expand Up @@ -379,14 +379,14 @@ def reduce(self,input_file=None,output_directory=None):
timeToWait = self._wait_for_file
wait_counter=0
if timeToWait > 0:
Found,input_file = PropertyManager.sample_run.find_file(PropertyManager,be_quet=True)
Found,input_file = PropertyManager.sample_run.find_file(self.reducer.prop_man,be_quet=True)
while not Found:
file_hint,fext = PropertyManager.sample_run.file_hint()
self.reducer.prop_man.log("*** Waiting {0} sec for file {1} to appear on the data search path"\
.format(timeToWait,file_hint),'notice')

self._run_pause(timeToWait)
Found,input_file = PropertyManager.sample_run.find_file(PropertyManager,file_hint=file_hint,be_quet=True)
Found,input_file = PropertyManager.sample_run.find_file(self.reducer.prop_man,file_hint=file_hint,be_quet=True)
if Found:
file,found_ext=os.path.splitext(input_file)
if found_ext != fext:
Expand Down

0 comments on commit 4aaebe6

Please sign in to comment.