summaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
authorStef Walter <stefw@gnome.org>2014-03-05 18:10:30 +0100
committerStef Walter <stefw@gnome.org>2014-03-06 14:01:00 +0100
commit6210ba499e0df2341a1660c35d6c9c2c74611c8b (patch)
treeb8a11f92b75fc4479b911d6ee79359ae09e008e5 /build
parentb545c0a41f9b2b95680e79d6637aa298a3f6cfb0 (diff)
downloadgnome-keyring-6210ba499e0df2341a1660c35d6c9c2c74611c8b.tar.gz
tap-gtester: Set the HARNESS_ACTIVE environment variable
This allows tests to detect whether they're running under a harness or not. In addition handle the way GTests skips better.
Diffstat (limited to 'build')
-rwxr-xr-xbuild/tap-gtester11
1 files changed, 7 insertions, 4 deletions
diff --git a/build/tap-gtester b/build/tap-gtester
index ff7506a4..7e667d4d 100755
--- a/build/tap-gtester
+++ b/build/tap-gtester
@@ -74,10 +74,11 @@ class GTestCompiler(NullCompiler):
self.test_remaining.remove(self.test_name)
self.test_num += 1
elif cmd == "result":
- if data == "OK":
- print "ok %d %s" % (self.test_num, self.test_name)
- if data == "FAIL":
- print "not ok %d %s", (self.test_num, self.test_name)
+ if self.test_name:
+ if data == "OK":
+ print "ok %d %s" % (self.test_num, self.test_name)
+ if data == "FAIL":
+ print "not ok %d %s", (self.test_num, self.test_name)
self.test_name = None
elif cmd == "skipping":
if "/subprocess" not in data:
@@ -151,6 +152,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)