Salome HOME
Remove special process for PARAVIS
authorCédric Aguerre <cedric.aguerre@edf.fr>
Mon, 18 Apr 2016 16:25:28 +0000 (18:25 +0200)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Mon, 2 May 2016 08:46:10 +0000 (10:46 +0200)
bin/appliskel/salome_tester/salome_instance.py
bin/appliskel/salome_tester/salome_test_driver.py
bin/appliskel/salome_tester/salome_test_driver_gui.py

index 950ea281c3f4ca46e17e149c33cff41ae36c615e..8fb347e928580f7b8502438a1abed63a3d8fda2f 100644 (file)
@@ -57,7 +57,7 @@ class SalomeInstance(object):
   def __run(self, args=None, with_gui=False):
     if args is None:
       args = []
-      
+
     sys.argv = ['runSalome'] + args
 
     if with_gui:
@@ -77,7 +77,7 @@ class SalomeInstance(object):
     setenv.main(True)
     import runSalome
     runSalome.runSalome()
-    
+
     if not with_gui:
       import salome
       salome.salome_init()
index f2a1fc5509f1ff3a65b02b769a98a61b8dc2a60c..068bf89a0ec549152ba908a355bf7294f9340902 100644 (file)
@@ -38,43 +38,17 @@ def runTest(command):
   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:
     print out
     pass
   if err:
-    print err
-  print "Status code: ", res
+    print "    ** Detected error **"
+    print "Error code: ", res
+    print err,
+    print "    ** end of message **"
+    pass
   return res
 #
 
@@ -112,7 +86,7 @@ if __name__ == "__main__":
     from threading import Timer
     timer = Timer(timeout_sec, timeoutHandler)
     timer.start()
-  else:    
+  else:
     signal.alarm(timeout_sec)
     signal.signal(signal.SIGALRM, timeoutHandler)
 
@@ -123,8 +97,7 @@ if __name__ == "__main__":
     salome_instance = SalomeInstance.start(shutdown_servers=True)
     port = salome_instance.get_port()
     res, out, err = runTest(test_and_args)
-    #res = processResult(res, out, err)
-    res = processResultSpecialParavis(res, out, err)
+    res = processResult(res, out, err)
   except TimeoutException:
     print "FAILED : timeout(%s) is reached"%timeout_delay
   except:
index de4fbc5f416b36576019aef721e46a96cb88e3fb..284f9e6247e85ac0b709aabe0d16821e0d928085 100644 (file)
@@ -57,7 +57,7 @@ if __name__ == "__main__":
     from threading import Timer
     timer = Timer(timeout_sec, timeoutHandler)
     timer.start()
-  else:    
+  else:
     signal.alarm(timeout_sec)
     signal.signal(signal.SIGALRM, timeoutHandler)