From 931afb0674f6b703953ee0b6d95093e5e016f22f Mon Sep 17 00:00:00 2001 From: Renato Alves Date: Sun, 26 Apr 2015 17:44:41 +0100 Subject: [PATCH 1/2] Tests: Documentation on TASK/TASKD_USE_PATH --- test/basetest/README | 3 ++- test/basetest/utils.py | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/basetest/README b/test/basetest/README index 037b22164..7fafa644b 100644 --- a/test/basetest/README +++ b/test/basetest/README @@ -2,4 +2,5 @@ Shell environment variables that affect how and what tests are executed: TASKW_SKIP -> Causes any test that needs Taskwarrior (task binary) to be skipped TASKD_SKIP -> Causes any test that needs Task Server (taskd binary) to be skipped -USE_PATH -> Causes tests to look for "task" and "taskd" in PATH instead of the default location +TASK_USE_PATH -> Causes tests to look for "task" in PATH instead of the default location +TASKD_USE_PATH -> Causes tests to look for "taskd" in PATH instead of the default location diff --git a/test/basetest/utils.py b/test/basetest/utils.py index 1e2344cde..78c9fbf80 100644 --- a/test/basetest/utils.py +++ b/test/basetest/utils.py @@ -129,9 +129,9 @@ def _queue_output(arguments, pidq, outputq): outputq.put(( "", ("Unexpected exception caught during execution of taskw: '{0}' . " - "If you are running out-of-tree tests set USE_PATH=1 in shell " - "env before execution and add the location of the task(d) binary " - "to the PATH".format(e)), + "If you are running out-of-tree tests set TASK_USE_PATH=1 or " + "TASKD_USE_PATH=1 in shell env before execution and add the " + "location of the task(d) binary to the PATH".format(e)), 255)) # false exitcode return From e60ea2e07aeae1ef7dc0d37cb48796e034df4921 Mon Sep 17 00:00:00 2001 From: Renato Alves Date: Sun, 26 Apr 2015 18:13:20 +0100 Subject: [PATCH 2/2] Revert "Tests: Use IP address instead of hostname with taskd" Going back to using "localhost". Using the IP address causes GNUTLS handshake errors in GnuTLS <= 3.2.18 This reverts commit 233d97fbff3c7c6c1869324af4e09e9d869a4ae6. --- test/basetest/taskd.py | 2 +- test/basetest/utils.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/basetest/taskd.py b/test/basetest/taskd.py index e905c5a82..f76188cbb 100644 --- a/test/basetest/taskd.py +++ b/test/basetest/taskd.py @@ -39,7 +39,7 @@ class Taskd(object): TASKD_NOT_LISTENING = 3 def __init__(self, taskd=DEFAULT_TASKD, certpath=None, - address="127.0.0.1"): + address="localhost"): """Initialize a Task server that runs in the background and stores data in a temporary folder diff --git a/test/basetest/utils.py b/test/basetest/utils.py index 78c9fbf80..b9824cfc6 100644 --- a/test/basetest/utils.py +++ b/test/basetest/utils.py @@ -279,7 +279,7 @@ def get_IPs(hostname): return output -def port_used(addr="127.0.0.1", port=None): +def port_used(addr="localhost", port=None): "Return True if port is in use, False otherwise" if port is None: raise TypeError("Argument 'port' may not be None") @@ -304,7 +304,7 @@ def port_used(addr="127.0.0.1", port=None): return False -def find_unused_port(addr="127.0.0.1", start=53589, track=True): +def find_unused_port(addr="localhost", start=53589, track=True): """Find an unused port starting at `start` port If track=False the returned port will not be marked as in-use and the code