react-native-navigation的迁移库

123456789101112131415161718192021222324252627282930
  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(`cd android && ./gradlew uninstallAll`);
  12. shellUtils.exec.execSync(`cd android && ./gradlew connectedDebugAndroidTest`);
  13. }
  14. function run() {
  15. shellUtils.exec.execSync(`echo 'travis_fold:start:android-espresso'`);
  16. try {
  17. // if (process.env.CI) {
  18. // runEmulator();
  19. // }
  20. e2e();
  21. } finally {
  22. shellUtils.exec.execSync(`echo 'travis_fold:end:android-espresso'`);
  23. }
  24. }
  25. run();