Skip to content

Commit

Permalink
Enablee parallel e2e exec on Android, switch to quick-booting emu (#5686
Browse files Browse the repository at this point in the history
)
  • Loading branch information
d4vidi authored and guyca committed Nov 26, 2019
1 parent cb63997 commit b53bbf3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"test-unit-android": "node ./scripts/test-unit --android",
"pretest-e2e-android": "npm run build",
"test-e2e-android": "node ./scripts/test-e2e --android",
"test-e2e-android-multi": "npm run test-e2e-android -- --multi",
"test-e2e-android-locked": "node ./scripts/test-e2e-android-locked",
"pretest-e2e-ios": "npm run build",
"test-e2e-ios": "node ./scripts/test-e2e --ios",
Expand Down Expand Up @@ -150,13 +151,13 @@
"binaryPath": "playground/android/app/build/outputs/apk/debug/app-debug.apk",
"build": "cd playground/android && ./gradlew app:assembleDebug app:assembleAndroidTest -DtestBuildType=debug",
"type": "android.emulator",
"name": "Pixel_2_API_26"
"name": "Nexus_5X_API_26"
},
"android.emu.release": {
"binaryPath": "playground/android/app/build/outputs/apk/release/app-release.apk",
"build": "cd playground/android && ./gradlew app:assembleRelease app:assembleAndroidTest -DtestBuildType=release",
"type": "android.emulator",
"name": "Pixel_2_API_26"
"name": "Nexus_5X_API_26"
},
"android.emu.debug.locked": {
"binaryPath": "playground/android/app/build/outputs/apk/debug/app-debug.apk",
Expand Down
4 changes: 3 additions & 1 deletion scripts/test-e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const release = _.includes(process.argv, '--release');
const skipBuild = _.includes(process.argv, '--skipBuild');
const headless = _.includes(process.argv, '--headless');
const multi = _.includes(process.argv, '--multi');
const verbose = _.includes(process.argv, '--verbose');

run();

Expand All @@ -15,6 +16,7 @@ function run() {
const configuration = `${prefix}.${suffix}`;
const headless$ = android ? headless ? `--headless` : `` : ``;
const workers = multi ? 3 : 1;
const loglevel = verbose ? '--loglevel verbose' : '';

if (!android) {
exec.execSync('npm run build');
Expand All @@ -23,5 +25,5 @@ function run() {
if (!skipBuild) {
exec.execSync(`detox build --configuration ${configuration}`);
}
exec.execSync(`detox test --configuration ${configuration} ${headless$} ${!android ? `-w ${workers}` : ``}`); //-f "ScreenStyle.test.js" --loglevel trace
exec.execSync(`detox test --configuration ${configuration} ${headless$} -w ${workers} ${loglevel}`); //-f "ScreenStyle.test.js" --loglevel trace
}

0 comments on commit b53bbf3

Please sign in to comment.