react-native-navigation的迁移库

e2e.android.js 909B

12345678910111213141516171819202122232425262728293031
  1. const _ = require('lodash');
  2. const shellUtils = require('shell-utils');
  3. const fs = require('fs');
  4. function runEmulator() {
  5. // shellUtils.exec.execSync(`echo no | android create avd --force -n test -t android-25 --abi armeabi-v7a`);
  6. // shellUtils.exec.execSync(`emulator -avd test -no-skin -no-audio -no-window &`);
  7. // shellUtils.exec.execSync(`android-wait-for-emulator`);
  8. // shellUtils.exec.execSync(`adb shell input keyevent 82 &`);
  9. }
  10. function e2e() {
  11. shellUtils.exec.execSync(`yarn run uninstall-android`);
  12. shellUtils.exec.execSync(`yarn run android`);
  13. shellUtils.exec.execSync(`cd ../AndroidE2E/ && ./gradlew connectedDebugAndroidTest`);
  14. }
  15. function run() {
  16. if (process.env.CI) {
  17. return;
  18. }
  19. shellUtils.exec.execSync(`echo 'travis_fold:start:android-e2e'`);
  20. try {
  21. e2e();
  22. } finally {
  23. shellUtils.exec.execSync(`echo 'travis_fold:end:android-e2e'`);
  24. }
  25. }
  26. run();