Browse Source

fixing travis

Daniel Zlotin 7 years ago
parent
commit
b31ccf18d8
2 changed files with 6 additions and 8 deletions
  1. 5
    7
      playground/scripts/e2e.ios.js
  2. 1
    1
      scripts/travis.sh

+ 5
- 7
playground/scripts/e2e.ios.js View File

16
 
16
 
17
   shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb ${release ? '' : 'debug'}`);
17
   shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb ${release ? '' : 'debug'}`);
18
 
18
 
19
-  shellUtils.exec.execSync(`echo -en 'travis_fold:start:xcodebuild\n'`);
19
+  shellUtils.exec.execSync(`echo 'travis_fold:start:xcodebuild'`);
20
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
20
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
21
           cd ios && xcodebuild
21
           cd ios && xcodebuild
22
             -scheme ${scheme} build
22
             -scheme ${scheme} build
29
   } else {
29
   } else {
30
     shellUtils.exec.execSync(`${cmd}`);
30
     shellUtils.exec.execSync(`${cmd}`);
31
   }
31
   }
32
-  shellUtils.exec.execSync(`echo -en 'travis_fold:end:xcodebuild\n'`);
32
+  shellUtils.exec.execSync(`echo 'travis_fold:end:xcodebuild'`);
33
 }
33
 }
34
 function hasXcpretty() {
34
 function hasXcpretty() {
35
   try {
35
   try {
41
 
41
 
42
 function e2e() {
42
 function e2e() {
43
   try {
43
   try {
44
+    shellUtils.exec.execSync(`echo 'travis_fold:start:detox-ios'`);
44
     shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
45
     shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
45
     shellUtils.exec.kill(`detox-server`);
46
     shellUtils.exec.kill(`detox-server`);
46
     shellUtils.exec.exec(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
47
     shellUtils.exec.exec(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
49
     shellUtils.exec.execSync(`detoxAppBuildPath="${detoxAppBuildPath}"
50
     shellUtils.exec.execSync(`detoxAppBuildPath="${detoxAppBuildPath}"
50
                               BABEL_ENV=test
51
                               BABEL_ENV=test
51
                               ./node_modules/mocha/bin/mocha e2e
52
                               ./node_modules/mocha/bin/mocha e2e
52
-                                --timeout 120000
53
+                                --timeout 240000
53
                                 --recursive
54
                                 --recursive
54
                                 --compilers js:babel-register`);
55
                                 --compilers js:babel-register`);
55
   } finally {
56
   } finally {
56
     shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb`);
57
     shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb`);
57
     shellUtils.exec.kill(`detox-server`);
58
     shellUtils.exec.kill(`detox-server`);
58
-    if (release) {
59
-      shellUtils.exec.kill(`Simulator`);
60
-      shellUtils.exec.kill(`CoreSimulator`);
61
-    }
62
     shellUtils.exec.execSync(`cat ./detox-server.log`);
59
     shellUtils.exec.execSync(`cat ./detox-server.log`);
63
     shellUtils.exec.execSync(`rm -f ./detox-server.log`);
60
     shellUtils.exec.execSync(`rm -f ./detox-server.log`);
64
     shellUtils.exec.execSync(`sleep 5`);
61
     shellUtils.exec.execSync(`sleep 5`);
62
+    shellUtils.exec.execSync(`echo 'travis_fold:end:detox-ios'`);
65
   }
63
   }
66
 }
64
 }
67
 
65
 

+ 1
- 1
scripts/travis.sh View File

5
 
5
 
6
 echo "************ 1"
6
 echo "************ 1"
7
 
7
 
8
-RCT_NO_LAUNCH_PACKAGER=true cd ios && xcodebuild -scheme playground_release_Detox build -project playground.xcodeproj -sdk iphonesimulator -derivedDataPath ./DerivedData/playground
8
+RCT_NO_LAUNCH_PACKAGER=true cd ios && xcodebuild -scheme playground_release_Detox build -project playground.xcodeproj -sdk iphonesimulator -derivedDataPath ./DerivedData/playground | xcpretty
9
 cd ..
9
 cd ..
10
 
10
 
11
 echo "************ 2"
11
 echo "************ 2"