From b00e49b1a4624de39ae81f44d3256bf361279a8c Mon Sep 17 00:00:00 2001 From: Pedro Alvarez Date: Fri, 25 Sep 2015 14:58:49 +0000 Subject: Skip tests when system wasn't definied --- tester | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tester') diff --git a/tester b/tester index ac0de6a..6d368ce 100755 --- a/tester +++ b/tester @@ -379,8 +379,12 @@ class ReleaseApp(cliapp.Application): for system in step['systems']: # TODO: Get user for each command from test file # TODO: Pass prefix, so systems can talk to each other - s = self.systems[system] - s.runcmd(['sh', '-c', cmd], 'root') + try: + s = self.systems[system] + except KeyError: + print "WARNING: System " + system + " not defined, ignoring test" + else: + s.runcmd(['sh', '-c', cmd], 'root') def clean_up(self): print('[Local] Clean up systems on remote hosts:') -- cgit v1.2.1