From: Cédric Aguerre Date: Fri, 20 Mar 2015 16:05:31 +0000 (+0100) Subject: temp tricky for PVIS X-Git-Tag: V7_6_0a1~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ee0623e2737ec7ac3c63f6f1eaf06101aa1cc956;p=modules%2Fkernel.git temp tricky for PVIS print test status code update comment text --- diff --git a/bin/appliskel/salome_tester/salome_test_driver.py b/bin/appliskel/salome_tester/salome_test_driver.py index 2587881ce..ee468557b 100644 --- a/bin/appliskel/salome_tester/salome_test_driver.py +++ b/bin/appliskel/salome_tester/salome_test_driver.py @@ -32,10 +32,41 @@ def runTest(command): p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = p.communicate() res = p.returncode - + # About res value: + # A negative value -N indicates that the child was terminated by signal N (Unix only). + # On Unix, the value 11 generally corresponds to a segmentation fault. return res, out, err # +def processResultSpecialParavis(res, out, err): + # :TRICKY: Special case of returncode=127 + # When using paraview in SALOME environment, the following error + # systematically appears when exiting paraview (it's also true when using + # PARAVIS and exiting SALOME): + # Inconsistency detected by ld.so: dl-close.c: 738: _dl_close: Assertion `map->l_init_called' failed! + # For PARAVIS tests purpose, paraview functionalities are accessed in each + # test; these tests are run in the above subprocess call. + # The assertion error implies a subprocess return code of 127, and the test + # status is considered as "failed". + # The tricky part here is to discard such return codes, waiting for a fix + # maybe in paraview... + if res == 127 and err.startswith("Inconsistency detected by ld.so: dl-close.c"): + print " ** THE FOLLOWING MESSAGE IS DISCARDED WHEN ANALYZING TEST SUCCESSFULNESS **" + print err, + print " ** end of message **" + res = 0 + elif err: + print " ** Detected error **" + print "Error code: ", res + print err, + print " ** end of message **" + pass + + if out: + print out + return res +# + # Display output and errors def processResult(res, out, err): if out: @@ -44,6 +75,7 @@ def processResult(res, out, err): if err: print err print "Status code: ", res + return res # # Timeout management @@ -84,7 +116,8 @@ if __name__ == "__main__": try: port = startSession() res, out, err = runTest(test_and_args) - processResult(res, out, err) + #res = processResult(res, out, err) + res = processResultSpecialParavis(res, out, err) except TimeoutException: print "FAILED : timeout(%s) is reached"%timeout_delay except: @@ -93,5 +126,6 @@ if __name__ == "__main__": pass terminateSession(port) + print "Exit test with status code:", res exit(res) #