From 8ebb891bf8f8395ab9a5cc8b27fa10f2e2e4001f Mon Sep 17 00:00:00 2001 From: Ryan Kelly Date: Tue, 17 Mar 2020 07:54:26 +1100 Subject: [PATCH] Some cleanups for running the sync integration tests --- .../mozilla/fenix/syncintegration/gradlewbuild.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/androidTest/java/org/mozilla/fenix/syncintegration/gradlewbuild.py b/app/src/androidTest/java/org/mozilla/fenix/syncintegration/gradlewbuild.py index 0a0ab3cd6..d4b325c00 100644 --- a/app/src/androidTest/java/org/mozilla/fenix/syncintegration/gradlewbuild.py +++ b/app/src/androidTest/java/org/mozilla/fenix/syncintegration/gradlewbuild.py @@ -21,20 +21,23 @@ class GradlewBuild(object): # Change path accordingly to go to root folder to run gradlew os.chdir('../../../../../../../..') - args = './gradlew ' + 'app:connectedGeckoNightlyDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=org.mozilla.fenix.syncintegration.SyncIntegrationTest#{}'.format(identifier) + cmd = './gradlew ' + 'app:connectedGeckoNightlyDebugAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=org.mozilla.fenix.syncintegration.SyncIntegrationTest#{}'.format(identifier) - self.logger.info('Running: {}'.format(' '.join(args))) + self.logger.info('Running cmd: {}'.format(cmd)) + out = "" try: out = subprocess.check_output( - args, shell=True) + cmd, + shell=True, + stderr=subprocess.STDOUT) except subprocess.CalledProcessError as e: out = e.output raise finally: - #Set the path correctly + # Set the path correctly testsPath = "app/src/androidTest/java/org/mozilla/fenix/syncintegration/" os.chdir(testsPath) with open(self.log, 'w') as f: - f.writelines(out) + f.write(out)