Bladeren bron

migrated detox

Daniel Zlotin 8 jaren geleden
bovenliggende
commit
d860f71d02

+ 0
- 21
playground/ios/playground.xcodeproj/project.pbxproj Bestand weergeven

@@ -451,7 +451,6 @@
451 451
 				13B07F8C1A680F5B00A75B9A /* Frameworks */,
452 452
 				13B07F8E1A680F5B00A75B9A /* Resources */,
453 453
 				00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
454
-				6956ED03EAA1831C238A5BB4 /* Copy Detox Framework */,
455 454
 			);
456 455
 			buildRules = (
457 456
 			);
@@ -727,20 +726,6 @@
727 726
 			shellPath = /bin/sh;
728 727
 			shellScript = "export NODE_BINARY=node\n../node_modules/react-native/packager/react-native-xcode.sh";
729 728
 		};
730
-		6956ED03EAA1831C238A5BB4 /* Copy Detox Framework */ = {
731
-			isa = PBXShellScriptBuildPhase;
732
-			buildActionMask = 2147483647;
733
-			files = (
734
-			);
735
-			inputPaths = (
736
-			);
737
-			name = "Copy Detox Framework";
738
-			outputPaths = (
739
-			);
740
-			runOnlyForDeploymentPostprocessing = 0;
741
-			shellPath = /bin/bash;
742
-			shellScript = "if [ -n \"$DEPLOY_DETOX_FRAMEWORK\" ]; then\nmkdir -p \"${BUILT_PRODUCTS_DIR}\"/\"${FRAMEWORKS_FOLDER_PATH}\"\ncp -r \"${PROJECT_DIR}\"/../node_modules/detox/Detox.framework \"${BUILT_PRODUCTS_DIR}\"/\"${FRAMEWORKS_FOLDER_PATH}\"\nfi";
743
-		};
744 729
 /* End PBXShellScriptBuildPhase section */
745 730
 
746 731
 /* Begin PBXSourcesBuildPhase section */
@@ -981,8 +966,6 @@
981 966
 			buildConfigurations = (
982 967
 				00E356F61AD99517003FC87E /* Debug */,
983 968
 				00E356F71AD99517003FC87E /* Release */,
984
-				2984212B73D7531DE5F65D1F /* Debug_Detox */,
985
-				048D2E7E9477FA2088E39149 /* Release_Detox */,
986 969
 			);
987 970
 			defaultConfigurationIsVisible = 0;
988 971
 			defaultConfigurationName = Debug;
@@ -992,8 +975,6 @@
992 975
 			buildConfigurations = (
993 976
 				13B07F941A680F5B00A75B9A /* Debug */,
994 977
 				13B07F951A680F5B00A75B9A /* Release */,
995
-				DB9A0E11DD86A380A31F9DD9 /* Debug_Detox */,
996
-				29AFC5A9B25FF77E054960D7 /* Release_Detox */,
997 978
 			);
998 979
 			defaultConfigurationIsVisible = 0;
999 980
 			defaultConfigurationName = Debug;
@@ -1003,8 +984,6 @@
1003 984
 			buildConfigurations = (
1004 985
 				83CBBA201A601CBA00E9B192 /* Debug */,
1005 986
 				83CBBA211A601CBA00E9B192 /* Release */,
1006
-				57FA1AC8487324BC4A99A465 /* Debug_Detox */,
1007
-				BBF3AB28495B87423DAC695F /* Release_Detox */,
1008 987
 			);
1009 988
 			defaultConfigurationIsVisible = 0;
1010 989
 			defaultConfigurationName = Debug;

+ 0
- 34
playground/scripts/detoxDebugFix.rb Bestand weergeven

@@ -1,34 +0,0 @@
1
-#!/usr/bin/env ruby
2
-
3
-require 'pathname'
4
-
5
-$LOAD_PATH.unshift(__dir__ + "/../node_modules/detox/scripts/Xcodeproj/lib")
6
-$LOAD_PATH.unshift(__dir__ + "/../node_modules/detox/scripts/Nanaimo/lib")
7
-
8
-require 'xcodeproj'
9
-
10
-isAlwaysDebug = ARGV.count > 0 && ARGV[0].to_s.eql?('debug')
11
-
12
-project = Xcodeproj::Project.open(__dir__ + "/../node_modules/react-native/React/React.xcodeproj")
13
-
14
-debug_preprocessor_macros = project.build_configuration_list['Debug'].build_settings['GCC_PREPROCESSOR_DEFINITIONS']
15
-release_preprocessor_macros = project.build_configuration_list['Release'].build_settings['GCC_PREPROCESSOR_DEFINITIONS']
16
-
17
-unless debug_preprocessor_macros.kind_of?(Array)
18
-  debug_preprocessor_macros = [debug_preprocessor_macros]
19
-end
20
-unless release_preprocessor_macros.kind_of?(Array)
21
-  release_preprocessor_macros = [release_preprocessor_macros]
22
-end
23
-
24
-if isAlwaysDebug then
25
-  release_preprocessor_macros = release_preprocessor_macros | debug_preprocessor_macros
26
-else
27
-  release_preprocessor_macros = release_preprocessor_macros - debug_preprocessor_macros
28
-end
29
-
30
-project.build_configuration_list['Release'].build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = release_preprocessor_macros
31
-
32
-project.build_configuration_list['Release'].build_settings['WARNING_CFLAGS'] = ['-Wno-shorten-64-to-32','-Wno-unused-parameter','-Wno-unreachable-code','-Wno-deprecated-declarations','-Wno-extra-tokens','-Wno-unused-variable','-Wno-incompatible-pointer-types','-Wno-conditional-uninitialized','-Wno-undeclared-selector','-Wno-objc-protocol-property-synthesis']
33
-
34
-raise "Error: Unable to save Xcode project" unless project.save()

+ 2
- 13
playground/scripts/e2e.ios.js Bestand weergeven

@@ -4,17 +4,8 @@ const fs = require('fs');
4 4
 
5 5
 const release = _.includes(process.argv, 'release');
6 6
 
7
-function hackReactXcodeScript() {
8
-  const fileToHack = `./node_modules/react-native/packager/react-native-xcode.sh`;
9
-  const lines = _.split(String(fs.readFileSync(fileToHack)), '\n');
10
-  lines[11] = release ? '' : `exit 0;`;
11
-  fs.writeFileSync(fileToHack, _.join(lines, '\n'));
12
-}
13
-
14 7
 function buildProjForDetox() {
15
-  const scheme = release ? `playground_release_Detox` : `playground_Detox`;
16
-
17
-  shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb ${release ? '' : 'debug'}`);
8
+  const scheme = release ? `playground_release` : `playground`;
18 9
 
19 10
   shellUtils.exec.execSync(`echo 'travis_fold:start:xcodebuild'`);
20 11
   const cmd = `RCT_NO_LAUNCH_PACKAGER=true
@@ -46,7 +37,7 @@ function e2e() { //eslint-disable-line
46 37
     shellUtils.exec.execSyncSilent(`watchman watch-del-all || true`);
47 38
     shellUtils.exec.kill(`detox-server`);
48 39
     shellUtils.exec.exec(`./node_modules/.bin/detox-server > ./detox-server.log 2>&1`);
49
-    const detoxAppBuildPath = `ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}_Detox-iphonesimulator/playground.app`;
40
+    const detoxAppBuildPath = `ios/DerivedData/playground/Build/Products/${release ? 'Release' : 'Debug'}-iphonesimulator/playground.app`;
50 41
 
51 42
     shellUtils.exec.execSync(`detoxAppBuildPath="${detoxAppBuildPath}"
52 43
                               BABEL_ENV=test
@@ -55,7 +46,6 @@ function e2e() { //eslint-disable-line
55 46
                                 --recursive
56 47
                                 --compilers js:babel-register`);
57 48
   } finally {
58
-    shellUtils.exec.execSync(`./scripts/detoxDebugFix.rb`);
59 49
     shellUtils.exec.kill(`detox-server`);
60 50
     if (process.env.CI) {
61 51
       shellUtils.exec.kill(`Simulator`);
@@ -69,7 +59,6 @@ function e2e() { //eslint-disable-line
69 59
 }
70 60
 
71 61
 function run() {
72
-  hackReactXcodeScript();
73 62
   buildProjForDetox();
74 63
   e2e();
75 64
 }