summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-11-12 23:53:37 +0000
committerCarl Hetherington <cth@carlh.net>2014-11-12 23:53:37 +0000
commit750dce48a29dad3c1455e66c937efaf55fd81755 (patch)
treef997e18ee32e6814a47a137f8981d20e1aa3cbd3
parentbbd34ea61b7cef6a5fdedfa5a6f49ef6c4894096 (diff)
Tidy up test error handling, hopefully.
-rwxr-xr-xcdist10
1 files changed, 3 insertions, 7 deletions
diff --git a/cdist b/cdist
index e69ede0..ea3adf5 100755
--- a/cdist
+++ b/cdist
@@ -120,10 +120,6 @@ def scp_escape(n):
else:
return '\"%s\"' % s[0]
-def command(c):
- if os.system(c) != 0:
- raise Error('%s failed' % c)
-
def copytree(a, b):
log('copy %s -> %s' % (scp_escape(b), scp_escape(b)))
command('scp -r %s %s' % (scp_escape(a), scp_escape(b)))
@@ -147,10 +143,10 @@ def rmtree(a):
log('remove %s' % a)
shutil.rmtree(a, ignore_errors=True)
-def command(c, can_fail=False):
+def command(c):
log(c)
r = os.system(c)
- if (r >> 8) and not can_fail:
+ if (r >> 8):
raise Error('command %s failed' % c)
def command_and_read(c):
@@ -284,7 +280,7 @@ class Target(object):
project.checkout(self)
self.build_dependencies(project)
self.build(project)
- return project.cscript['test'](self)
+ project.cscript['test'](self)
def set(self, a, b):
self.variables[a] = b