tap-gtester: Set a standard environment variable for test harness
authorStef Walter <stefw@gnome.org>
Thu, 6 Mar 2014 11:50:46 +0000 (12:50 +0100)
committerStef Walter <stefw@gnome.org>
Thu, 6 Mar 2014 11:50:46 +0000 (12:50 +0100)
Lets tests know whether they're running under an automated
testing harness.

build/tap-gtester

index ff7506a..4b9dafb 100755 (executable)
@@ -151,6 +151,8 @@ def main(argv):
     cmd = args.command
     proc = None
 
+    os.environ['HARNESS_ACTIVE'] = '1'
+
     if format in ["auto", "gtest"]:
         list_cmd = cmd + ["-l", "--verbose"]
         proc = subprocess.Popen(list_cmd, close_fds=True, stdout=subprocess.PIPE)