Kill the PHP Server or Selenium when killing Behat
authorFrederic Massart <fred@moodle.com>
Mon, 7 Apr 2014 04:55:51 +0000 (12:55 +0800)
committerFrederic Massart <fred@moodle.com>
Mon, 7 Apr 2014 04:55:51 +0000 (12:55 +0800)
lib/commands/behat.py

index e8b083d..4b6f9c9 100644 (file)
@@ -255,7 +255,10 @@ class BehatCommand(Command):
                     sleep(3)
 
                 # Running the tests
-                process(cmd, M.path, None, None)
+                try:
+                    process(cmd, M.path, None, None)
+                except KeyboardInterrupt:
+                    pass
 
                 # Kill the remaining processes
                 if phpServer: