Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitee0dd14

Browse files
committed
Linked in ruby unit test runner
1 parent7407aa1 commitee0dd14

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

‎Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,5 @@ ui:
2121
logic:
2222
xcodebuild -sdk iphonesimulator -scheme XcodeTestSampleLogicTests build ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES
2323

24+
passing:
25+
xcodebuild -sdk iphonesimulator -scheme XcodeTestSamplePassingTests build ONLY_ACTIVE_ARCH=NO TEST_AFTER_BUILD=YES XCODETEST=YES

‎XcodeTestSample/XcodeTestSample.xcodeproj/project.pbxproj

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,7 @@
280280
C99C65EA15B432FE0092A9B4 /* Frameworks */,
281281
C99C65EB15B432FE0092A9B4 /* Resources */,
282282
C924254816175BDC00E5F418 /* ShellScript */,
283+
C90FE87716649CEE00E73469 /* ShellScript */,
283284
);
284285
buildRules = (
285286
);
@@ -369,6 +370,21 @@
369370
runOnlyForDeploymentPostprocessing = 0;
370371
shellPath = /bin/sh;
371372
shellScript = "# Run the unit tests in this test bundle.\n\"${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests\"\n";
373+
showEnvVarsInLog = 0;
374+
};
375+
C90FE87716649CEE00E73469 /* ShellScript */ = {
376+
isa = PBXShellScriptBuildPhase;
377+
buildActionMask = 2147483647;
378+
files = (
379+
);
380+
inputPaths = (
381+
);
382+
outputPaths = (
383+
);
384+
runOnlyForDeploymentPostprocessing = 0;
385+
shellPath = /bin/sh;
386+
shellScript = "if [ \"${XCODETEST}\" = \"YES\" ]; then\n ../scripts/RunUnitTests.rb\nfi\n";
387+
showEnvVarsInLog = 0;
372388
};
373389
C924254816175BDC00E5F418 /* ShellScript */ = {
374390
isa = PBXShellScriptBuildPhase;
@@ -381,7 +397,8 @@
381397
);
382398
runOnlyForDeploymentPostprocessing = 0;
383399
shellPath = /bin/sh;
384-
shellScript = "\"${PROJECT_DIR}/RunPlatformUnitTests.sh\"";
400+
shellScript = "if [ \"${XCODETEST}\" = \"\" ]; then\n \"${PROJECT_DIR}/RunPlatformUnitTests.sh\"\nfi\n";
401+
showEnvVarsInLog = 0;
385402
};
386403
C924254E16175C2700E5F418 /* ShellScript */ = {
387404
isa = PBXShellScriptBuildPhase;
@@ -395,6 +412,7 @@
395412
runOnlyForDeploymentPostprocessing = 0;
396413
shellPath = /bin/sh;
397414
shellScript = "\"${PROJECT_DIR}/RunPlatformUnitTests.sh\"";
415+
showEnvVarsInLog = 0;
398416
};
399417
/* End PBXShellScriptBuildPhase section */
400418

‎scripts/RunUnitTests.rb

100644100755
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env ruby
12
# Run the unit tests in this test bundle.
23
# Use ios-sim to trigger the unit test
34
# Reference: http://stackoverflow.com/questions/5403991/xcode-4-run-tests-from-the-command-line-xcodebuild
@@ -11,7 +12,11 @@
1112

1213
system%Q{osascript -e 'tell app "iPhone Simulator" to quit'}
1314

14-
launcher_path="./scripts/ios-sim"
15+
launcher_path=`which ios-sim`.strip
16+
iflauncher_path.nil?
17+
puts"Could not find ios-sim on your system."
18+
end
19+
1520
test_bundle_path=File.join(ENV['BUILT_PRODUCTS_DIR'],"#{ENV['PRODUCT_NAME']}.#{ENV['WRAPPER_EXTENSION']}")
1621
test_output_path=File.join(ENV['BUILD_DIR'],"kiwi-tests.out")
1722

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp