Skip to content

Commit 22fa141

Browse files
author
Keqiu Hu
authored
Merge pull request #106 from linkedin/fix_ui_only
Fix UI tests will not run with ONLY a UI test bundle #98
2 parents 095176a + 7ee0e21 commit 22fa141

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

Bluepill-runner/Bluepill-runner/BPApp.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,13 @@ + (instancetype)appWithConfig:(BPConfiguration *)config withError:(NSError *__au
4848
NSLog(@"There is .xctest file under %@", xcTestsPath);
4949
}
5050

51-
5251
NSArray *unitTestFiles = [self testFilesFromDirectory:xcTestsPath isUITestBundle:NO withError:error];
5352
if (unitTestFiles) {
5453
[allUnitTestFiles addObjectsFromArray:unitTestFiles];
5554
}
56-
if (error && *error) {return nil;}
55+
if (error && *error) {
56+
[BPUtils printInfo:INFO withString:@"No unit test detected - %@", [*error localizedDescription]];
57+
}
5758

5859
// Read ui test bundles.
5960
if (config.testRunnerAppPath) {
@@ -66,6 +67,9 @@ + (instancetype)appWithConfig:(BPConfiguration *)config withError:(NSError *__au
6667
[allUITestFiles addObjectsFromArray:uiTestFiles];
6768
}
6869
}
70+
if (error && *error) {
71+
[BPUtils printInfo:INFO withString:@"No UI test bundle detected %@", [*error localizedDescription]];
72+
}
6973
}
7074

7175
// Handle additional test bundles (assumption - unit test only, TO BE FIXED)

scripts/bluepill.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,11 @@ bluepill_build()
6464
-workspace Bluepill.xcworkspace \
6565
-scheme bluepill \
6666
-configuration Release \
67-
-derivedDataPath "build/" | tee results.txt | $XCPRETTY
67+
-derivedDataPath "build/" | tee result.txt | $XCPRETTY
6868

6969
test $? == 0 || {
7070
echo Build failed
71-
cat results.txt
71+
cat result.txt
7272
exit 1
7373
}
7474
test -x build/Build/Products/Release/bluepill || {
@@ -89,7 +89,7 @@ bluepill_build_sample_app()
8989

9090
test $? == 0 || {
9191
echo Build failed
92-
cat results.txt
92+
cat result.txt
9393
exit 1
9494
}
9595
set +o pipefail
@@ -135,7 +135,7 @@ bluepill_integration_tests()
135135

136136
if ! grep '\*\* TEST SUCCEEDED \*\*' result.txt; then
137137
echo 'Test failed'
138-
echo See results.txt for details
138+
echo See result.txt for details
139139
exit 1
140140
fi
141141
}

0 commit comments

Comments
 (0)