diff --git a/ellipsyswrapper/testsuite.py b/ellipsyswrapper/testsuite.py index ba63d33322965ebaa6cfcc281dd101abe9916b03..fb6065127010b449b50b8c2410027da16a2b8619 100644 --- a/ellipsyswrapper/testsuite.py +++ b/ellipsyswrapper/testsuite.py @@ -178,26 +178,32 @@ class CaseRunner(object): exepath = os.path.join(epath, self.flowfield) command = 'mpirun -np %i python %s' % (self.nprocs, exepath) # out = commands.getoutput(command) - status = subprocess.call(command, shell=True) - if status != 0: - raise RuntimeError('Case %s failed!' % self.casename) - # if self.debug: - # print 'out', out + if self.debug: + status = subprocess.call(command, shell=True) + else: + # Suppress output from EllipSys + FNULL = open(os.devnull, 'w') + status = subprocess.call(command, shell=True,stdout=FNULL) self.read_data(self.project, outname) self.jobid = None + print 'test1' print 'case %s ran in %f seconds' %(self.casename, time.time() - t0) elif self.exec_mode == 'shell': t0 = time.time() exepath = os.path.join(epath, self.flowfield) command = 'mpirun -np %i %s' % (self.nprocs, exepath) - status = subprocess.call(command, shell=True) + if self.debug: + status = subprocess.call(command, shell=True) + else: + # Suppress output from EllipSys + FNULL = open(os.devnull, 'w') + status = subprocess.call(command, shell=True,stdout=FNULL) # status, out = commands.getstatusoutput(command) if status != 0: raise RuntimeError('Case %s failed!' % self.casename) - # elif self.debug: - # print out self.read_data(self.project, outname) self.jobid = None + print 'test2' print 'case %s ran in %f seconds' %(self.casename, time.time() - t0) elif self.exec_mode == 'dry_run': print 'Running in dry run mode, copying pre-computed data!'