From 472a40902274772bbec66d93191b12d02131f1b7 Mon Sep 17 00:00:00 2001 From: Adam Tauber Date: Sat, 27 Feb 2016 18:41:09 +0100 Subject: [PATCH] [fix] robot tests --- searx/settings_robot.yml | 3 +++ searx/testing.py | 14 +++++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/searx/settings_robot.yml b/searx/settings_robot.yml index f14443cf5..fb193e43d 100644 --- a/searx/settings_robot.yml +++ b/searx/settings_robot.yml @@ -1,5 +1,6 @@ general: debug : False + instance_name : "searx_test" search: safe_search : 0 @@ -25,10 +26,12 @@ engines: - name : general_dummy engine : dummy categories : general + shortcut : gd - name : dummy_dummy engine : dummy categories : dummy + shortcut : dd locales: en : English diff --git a/searx/testing.py b/searx/testing.py index bc04d0fb0..cac3477e4 100644 --- a/searx/testing.py +++ b/searx/testing.py @@ -57,7 +57,7 @@ class SearxRobotLayer(Layer): ) def tearDown(self): - os.kill(self.server.pid, 15) + os.kill(self.server.pid, 9) # remove previously set environment variable del os.environ['SEARX_SETTINGS_PATH'] @@ -78,7 +78,11 @@ if __name__ == '__main__': base_dir = abspath(join(dirname(__file__), '../tests')) if sys.argv[1] == 'robot': - Runner(['--color', - '--auto-progress', - '--path', base_dir], - found_suites=[test_suite()]).run() + r = Runner(['--color', + '--auto-progress', + '--stop-on-error', + '--path', + base_dir], + found_suites=[test_suite()]) + r.run() + sys.exit(int(r.failed))