summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--build.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/build.py b/build.py
index b13c3d4..b30f43d 100644
--- a/build.py
+++ b/build.py
@@ -24,13 +24,15 @@ def build():
@xnt.target
def test():
"""Tests package"""
+ error_codes = []
print("Python Tests:")
- ec1 = xnt.setup(["test"])
+ error_codes.append(xnt.setup(["test"]))
clean()
- print("Python2 Tests:")
- ec2 = xnt.call(["python2", "setup.py", "test"])
- clean()
- return ec1 | ec2
+ if xnt.in_path("python2"):
+ print("Python2 Tests:")
+ error_codes.append(xnt.call(["python2", "setup.py", "test"]))
+ clean()
+ return sum(error_codes)
@xnt.target
def lint():