diff --git a/.ci/runner.py b/.ci/runner.py index 87087ba..96f98be 100755 --- a/.ci/runner.py +++ b/.ci/runner.py @@ -363,6 +363,12 @@ def runMultitest( self, tests ) : for testIdx, opt in enumerate( individualTestOpts ) : opt.testsConfig = testDirs[testIdx] + "/" + os.path.basename( self.globalOpts_.testsConfig ) + if testDirs : + self.log_push() + for testIdx, opt in enumerate( individualTestOpts ) : + self.log( "Test [{test}] will run {config} from {cwd}".format( test=opt.tests[0], config=opt.testsConfig, cwd=os.getcwd() ) ) + self.log_pop() + self.log_pop() self.log( "Spawning process pool of size {0} to perform {1} tests".format( self.globalOpts_.pool, len(tests) ) ) @@ -432,6 +438,10 @@ def runMultitest( self, tests ) : # main entry point for testing def run( self, tests ) : + currentDir = os.getcwd() + self.log( "Storing current working directory [{cwd}]".format( cwd=currentDir ) ) + self.log( " Will return to this directory at the end of testing" ) + for test in tests : if test not in self.tests_.keys() : msg = "Error: no test named '{0}'".format( test ) @@ -443,18 +453,23 @@ def run( self, tests ) : self.setWorkingDirectory() # Let joining steps into a single HPC job take precedence + success = True + logs = [] if self.globalOpts_.forceSingle : success = True logs = [] for test in tests : success = success and self.tests_[ test ].run() logs.append( self.tests_[ test ].logfile_ ) - return success, logs else : if hasattr( self.globalOpts_, 'joinHPC' ) : - return self.runHPCJoin( tests ) + success, logs = self.runHPCJoin( tests ) else : - return self.runMultitest( tests ) + success, logs = self.runMultitest( tests ) + + # Popping back to old cwd + os.chdir( currentDir ) + return success, logs # A separated helper function to wrap this in a callable format def runSuite( options ) :