From 8c7c737fb408d479b468fffb21b6a4993849b5b6 Mon Sep 17 00:00:00 2001 From: kennyballou Date: Tue, 2 Apr 2013 17:56:51 -0600 Subject: Add check for testing python2 explicitly --- build.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'build.py') 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(): -- cgit v1.2.1