diff --git a/tools/SiblingKiller.py b/tools/SiblingKiller.py index d84330db5b..50c7bed941 100644 --- a/tools/SiblingKiller.py +++ b/tools/SiblingKiller.py @@ -141,7 +141,7 @@ class SiblingKiller: def wait_for_server(self): for i in range(0, 2): - if self.ping(): # unsuccessful ping takes 5 seconds (look at PING_TIMEOUT) + if self.ping(): # unsuccessful ping takes 5 seconds (look at PING_TIMEOUT) iff there is a dead server occupying the port return True return False @@ -162,7 +162,7 @@ class SiblingKiller: def serving_process_id(self): resp = str() try: - response = urllib2.urlopen('http://localhost:{port}/id'.format(port=PORT), timeout=self.ping_timeout); + response = urllib2.urlopen('http://localhost:{port}/id'.format(port=self.port), timeout=self.ping_timeout); resp = response.read() id = int(resp) return id diff --git a/tools/run_desktop_tests.py b/tools/run_desktop_tests.py index 1391d498d2..87b0ccfc6f 100755 --- a/tools/run_desktop_tests.py +++ b/tools/run_desktop_tests.py @@ -116,11 +116,9 @@ class TestRunner: not_found = filter(not_on_disk, self.runlist) - # now let's move the tests that need a server either to the beginning or the end of the tests_to_run list - - tests_with_server = TESTS_REQUIRING_SERVER - for test in tests_with_server: + tests_with_server = list(TESTS_REQUIRING_SERVER) + for test in TESTS_REQUIRING_SERVER: if test in tests_to_run: tests_to_run.remove(test) else: @@ -204,10 +202,10 @@ class TestRunner: results = dict() for key in to_run_and_with_server_keys: - if key == WITH_SERVER: + if key == WITH_SERVER and categorized_tests[WITH_SERVER]: self.start_server() results = self.merge_dicts_of_lists(results, self.run_tests(categorized_tests[key])) - if key == WITH_SERVER: + if key == WITH_SERVER and categorized_tests[WITH_SERVER]: self.stop_server() self.print_pretty("failed", results[FAILED])