X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=bin%2Fappliskel%2Fsalome_tester%2Fsalome_test_driver_gui.py;h=92a19d6b3bfe0b34a9953d0bc1136ec528f4670a;hb=66b7b8c5d71f081f82f5dad2a3221a53ba9e4ee5;hp=284f9e6247e85ac0b709aabe0d16821e0d928085;hpb=ed8fdfdde9d472868db565ca7515896471fc2d50;p=modules%2Fkernel.git diff --git a/bin/appliskel/salome_tester/salome_test_driver_gui.py b/bin/appliskel/salome_tester/salome_test_driver_gui.py index 284f9e624..92a19d6b3 100644 --- a/bin/appliskel/salome_tester/salome_test_driver_gui.py +++ b/bin/appliskel/salome_tester/salome_test_driver_gui.py @@ -1,4 +1,4 @@ -# Copyright (C) 2015-2016 CEA/DEN, EDF R&D, OPEN CASCADE +# Copyright (C) 2015-2017 CEA/DEN, EDF R&D, OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -41,8 +41,8 @@ if __name__ == "__main__": # Add explicit call to python executable if a Python script is passed as # first argument if not args: - print "Invalid arguments for salome_test_driver_gui.py. No command defined." - exit(1) + print("Invalid arguments for salome_test_driver_gui.py. No command defined.") + sys.exit(1) _, ext = os.path.splitext(args[0]) test_and_args = args @@ -51,7 +51,7 @@ if __name__ == "__main__": setOmniOrbUserPath() # Set timeout handler - print "Test timeout explicitely set to: %s seconds"%timeout_delay + print("Test timeout explicitely set to: %s seconds"%timeout_delay) timeout_sec = abs(int(timeout_delay)-10) if sys.platform == 'win32': from threading import Timer @@ -66,15 +66,17 @@ if __name__ == "__main__": try: salome_instance = SalomeInstance.start(with_gui=True, args=test_and_args) except TimeoutException: - print "FAILED : timeout(%s) is reached"%timeout_delay + print("FAILED : timeout(%s) is reached"%timeout_delay) except: import traceback traceback.print_exc() pass - - salome_instance.stop() + try: + salome_instance.stop() + except: + pass if sys.platform == 'win32': timer.cancel() -# print "Exit test with status code:", res -# exit(res) +# print("Exit test with status code:", res) +# sys.exit(res) #