From 2fd2578adc2a5354b7e0c50f2e5a1d4c65843436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Diemer?= <stephane.diemer@ubicast.eu> Date: Mon, 26 Mar 2018 16:44:08 +0200 Subject: [PATCH] Handle ms testing suite git errors (refs #24994). --- tester.py | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/tester.py b/tester.py index 650abef8..8a8b552b 100755 --- a/tester.py +++ b/tester.py @@ -99,9 +99,9 @@ class Tester(): log('USAGE: ' + self.USAGE) sys.exit(1) else: - log("Optional target user : %s" % arg) + log('Optional target user : %s' % arg) if not os.path.isdir(os.path.join('/home', arg)): - log("Mediaserver user %s does not exist" % arg) + log('Mediaserver user %s does not exist' % arg) sys.exit(1) else: msuser = arg @@ -240,13 +240,15 @@ class Tester(): ms_path = os.path.join(path, 'ms-testing-suite') if not os.path.exists(ms_path): log('Cloning ms-testing-suite in "%s".' % ms_path) - subprocess.check_call(['git', 'clone', '--recursive', 'https://panel.ubicast.eu/git/mediaserver/ms-testing-suite.git', ms_path]) - log('Updating ms-testing-suite in "%s".' % ms_path) - os.chdir(ms_path) - subprocess.check_call(['git', 'pull', '--recurse-submodules']) - subprocess.check_call(['git', 'submodule', 'update', '--init', '--recursive']) - os.chdir(self.root_dir) + subprocess.call(['git', 'clone', '--recursive', 'https://panel.ubicast.eu/git/mediaserver/ms-testing-suite.git', ms_path]) + if os.path.exists(ms_path): + log('Updating ms-testing-suite in "%s".' % ms_path) + os.chdir(ms_path) + subprocess.call(['git', 'pull', '--recurse-submodules']) + subprocess.call(['git', 'submodule', 'update', '--init', '--recursive']) + os.chdir(self.root_dir) # Add tests to list + log('Add MediaServer tests if available.' % ms_path) wowza_dir = '/usr/local/WowzaStreamingEngine' etc_lives_conf = '/etc/mediaserver/lives_conf.py' local_lives_conf = '/home/%s/msinstance/conf/lives_conf.py' -- GitLab