Explorar el Código

fix test-e2e-android

Daniel Zlotin hace 7 años
padre
commit
d25b8bff60
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3
    3
      scripts/test.e2e.android.js

+ 3
- 3
scripts/test.e2e.android.js Ver fichero

@@ -38,10 +38,10 @@ function isDeviceRunning() {
38 38
 
39 39
 function startEmulator() {
40 40
   console.log(`Looking for avd...`);
41
-  const avds = exec.execSyncRead(`${process.env.ANDROID_HOME}/tools/bin/avdmanager list avd -c`);
42
-  const avdName = /^.*package\.xml(\S+)$/.exec(avds)[1];
41
+  const avdsRaw = exec.execSyncRead(`${process.env.ANDROID_HOME}/tools/bin/avdmanager list avd -c`);
42
+  const avdName = /^.*package\.xml(\S+)$/m.exec(avdsRaw)[1];
43 43
   if (_.isEmpty(avdName)) {
44
-    throw new Error(`Launch an android emulator or connect a device`);
44
+    throw new Error(`Can't find avd to launch. Please create an avd first.`);
45 45
   }
46 46
   console.log(`found avd name: ${avdName}, Launching...`);
47 47
   exec.execAsyncSilent(`${process.env.ANDROID_HOME}/tools/emulator -gpu host -no-audio @${avdName}`);