Browse Source

making ios e2e great again

Daniel Zlotin 7 years ago
parent
commit
b9ef478ca9

+ 16
- 2
lib/ios/ReactNativeNavigation.xcodeproj/xcshareddata/xcschemes/ReactNativeNavigation.xcscheme View File

3
    LastUpgradeVersion = "0820"
3
    LastUpgradeVersion = "0820"
4
    version = "1.3">
4
    version = "1.3">
5
    <BuildAction
5
    <BuildAction
6
-      parallelizeBuildables = "YES"
6
+      parallelizeBuildables = "NO"
7
       buildImplicitDependencies = "YES">
7
       buildImplicitDependencies = "YES">
8
       <BuildActionEntries>
8
       <BuildActionEntries>
9
+         <BuildActionEntry
10
+            buildForTesting = "YES"
11
+            buildForRunning = "YES"
12
+            buildForProfiling = "YES"
13
+            buildForArchiving = "YES"
14
+            buildForAnalyzing = "YES">
15
+            <BuildableReference
16
+               BuildableIdentifier = "primary"
17
+               BlueprintIdentifier = "83CBBA2D1A601D0E00E9B192"
18
+               BuildableName = "libReact.a"
19
+               BlueprintName = "React"
20
+               ReferencedContainer = "container:../../node_modules/react-native/React/React.xcodeproj">
21
+            </BuildableReference>
22
+         </BuildActionEntry>
9
          <BuildActionEntry
23
          <BuildActionEntry
10
             buildForTesting = "YES"
24
             buildForTesting = "YES"
11
             buildForRunning = "YES"
25
             buildForRunning = "YES"
23
       </BuildActionEntries>
37
       </BuildActionEntries>
24
    </BuildAction>
38
    </BuildAction>
25
    <TestAction
39
    <TestAction
26
-      buildConfiguration = "Debug"
40
+      buildConfiguration = "Release"
27
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
41
       selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
42
       selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29
       shouldUseLaunchSchemeArgsEnv = "YES">
43
       shouldUseLaunchSchemeArgsEnv = "YES">

+ 2
- 2
scripts/test.all.js View File

2
 
2
 
3
 function run() {
3
 function run() {
4
   exec.execSync(`yarn run test-js`);
4
   exec.execSync(`yarn run test-js`);
5
-  exec.execSync(`yarn run test-unit-android && yarn run test-unit-ios`);
5
+  exec.execSync(`yarn run test-unit-android && yarn run test-unit-ios -- release`);
6
   exec.exec(`yarn run test-e2e-android`);
6
   exec.exec(`yarn run test-e2e-android`);
7
-  exec.exec(`yarn run test-e2e-ios`);
7
+  exec.exec(`yarn run test-e2e-ios -- release`);
8
 }
8
 }
9
 
9
 
10
 run();
10
 run();

+ 2
- 1
scripts/test.e2e.ios.js View File

14
             -project playground.xcodeproj
14
             -project playground.xcodeproj
15
             -sdk iphonesimulator
15
             -sdk iphonesimulator
16
             -configuration ${conf}
16
             -configuration ${conf}
17
-            -derivedDataPath ./DerivedData/playground`;
17
+            -derivedDataPath ./DerivedData/playground
18
+            ONLY_ACTIVE_ARCH=YES`;
18
 
19
 
19
   if (exec.which(`xcpretty`)) {
20
   if (exec.which(`xcpretty`)) {
20
     exec.execSync(`${cmd} | xcpretty && exit \${PIPESTATUS[0]}`);
21
     exec.execSync(`${cmd} | xcpretty && exit \${PIPESTATUS[0]}`);

+ 10
- 3
scripts/test.unit.ios.js View File

1
+const _ = require('lodash');
1
 const exec = require('shell-utils').exec;
2
 const exec = require('shell-utils').exec;
2
 
3
 
4
+const release = _.includes(process.argv, 'release');
5
+
3
 function runWithXcpretty(cmd) {
6
 function runWithXcpretty(cmd) {
4
   if (exec.which(`xcpretty`)) {
7
   if (exec.which(`xcpretty`)) {
5
     exec.execSync(`${cmd} | xcpretty && exit \${PIPESTATUS[0]}`);
8
     exec.execSync(`${cmd} | xcpretty && exit \${PIPESTATUS[0]}`);
9
 }
12
 }
10
 
13
 
11
 function run() {
14
 function run() {
15
+  const conf = release ? `Release` : `Debug`;
12
   runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
16
   runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
13
           cd ./playground/ios && xcodebuild
17
           cd ./playground/ios && xcodebuild
14
             build build-for-testing
18
             build build-for-testing
15
             -scheme "ReactNativeNavigation"
19
             -scheme "ReactNativeNavigation"
16
             -project playground.xcodeproj
20
             -project playground.xcodeproj
17
             -sdk iphonesimulator
21
             -sdk iphonesimulator
18
-            -configuration Debug
19
-            -derivedDataPath ./DerivedData/playground`);
22
+            -configuration ${conf}
23
+            -derivedDataPath ./DerivedData/playground
24
+            ONLY_ACTIVE_ARCH=YES`);
20
   runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
25
   runWithXcpretty(`RCT_NO_LAUNCH_PACKAGER=true
21
           cd ./playground/ios && xcodebuild
26
           cd ./playground/ios && xcodebuild
22
             test-without-building
27
             test-without-building
23
             -scheme "ReactNativeNavigation"
28
             -scheme "ReactNativeNavigation"
24
             -project playground.xcodeproj
29
             -project playground.xcodeproj
25
             -sdk iphonesimulator
30
             -sdk iphonesimulator
31
+            -configuration ${conf}
26
             -destination 'platform=iOS Simulator,name=iPhone 7'
32
             -destination 'platform=iOS Simulator,name=iPhone 7'
27
-            -derivedDataPath ./DerivedData/playground`);
33
+            -derivedDataPath ./DerivedData/playground
34
+            ONLY_ACTIVE_ARCH=YES`);
28
 }
35
 }
29
 
36
 
30
 run();
37
 run();

+ 1
- 1
scripts/travis.sh View File

22
 run_f "yarn install"
22
 run_f "yarn install"
23
 run_f "yarn run test-js"
23
 run_f "yarn run test-js"
24
 run_f "yarn run test-unit-android"
24
 run_f "yarn run test-unit-android"
25
-run_f "yarn run test-unit-ios"
25
+run_f "yarn run test-unit-ios -- release"
26
 run_f "yarn run test-e2e-android"
26
 run_f "yarn run test-e2e-android"
27
 run_f "yarn run test-e2e-ios -- release"
27
 run_f "yarn run test-e2e-ios -- release"
28
 run_f "yarn run release"
28
 run_f "yarn run release"