1
0
Fork 0

Some cleanups for running the sync integration tests

master
Ryan Kelly 2020-03-17 07:54:26 +11:00 committed by Grisha Kruglov
parent 853a0acab4
commit 8ebb891bf8
1 changed files with 8 additions and 5 deletions

View File

@ -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)