Skip to content

Commit

Permalink
MOBSDK-310, MOBSDK-467 & MOBSDK-468: Bamboo should use committed scri…
Browse files Browse the repository at this point in the history
…pts to build and should produce JUnit test results so that Bamboo can properly report test results.
  • Loading branch information
Gavin Cornwell committed Mar 14, 2013
1 parent 14076fb commit e922fb7
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
xcuserdata
AlfrescoSDK/build
AlfrescoSDK/AlfrescoSDK/help
AlfrescoSDK/AlfrescoSDKHelp
AlfrescoSDK/test-reports


4 changes: 1 addition & 3 deletions AlfrescoSDK/AlfrescoSDKTests/AlfrescoBaseTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -541,14 +541,12 @@ - (void) runAllSitesTest:(AlfrescoTestBlock)sessionTestBlock
if (self.isCloud)
{
AlfrescoLogInfo(@"Running test against Cloud server: %@ with username: %@", self.server, self.userName);
// [AlfrescoLog sharedInstance].logLevel = AlfrescoLogLevelTrace;
[self authenticateCloudServer];
[self resetTestVariables];
}
else
{
AlfrescoLogInfo(@"Running test against OnPremise server: %@ with username: %@", self.server, self.userName);
// [AlfrescoLog sharedInstance].logLevel = AlfrescoLogLevelDebug;
[self authenticateOnPremiseServer];
[self resetTestVariables];
}
Expand All @@ -574,7 +572,7 @@ - (void) runAllSitesTest:(AlfrescoTestBlock)sessionTestBlock

[self removeTestDocument];
[self resetTestVariables];
[self waitAtTheEnd];
// [self waitAtTheEnd];
}
}
}
Expand Down
9 changes: 9 additions & 0 deletions AlfrescoSDK/build_appledoc.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
rm -rf AlfrescoSDKHelp
mkdir AlfrescoSDKHelp

# Build documentation if appledoc is installed
if type -p appledoc &>/dev/null; then
appledoc --project-name AlfrescoSDK --project-company "Alfresco" --company-id com.alfresco.alfrescosdk --output AlfrescoSDKHelp --keep-intermediate-files --exit-threshold 2 --ignore .m --ignore AlfrescoSDKTests . --ignore CMIS .
else
echo "appledoc executable can not be found, you can find installation instuctions at https://github.com/tomaz/appledoc"
fi
5 changes: 0 additions & 5 deletions AlfrescoSDK/build_universal_lib.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
BUILD_UNIVERSAL_LIB='TRUE'
export BUILD_UNIVERSAL_LIB
xcodebuild -project AlfrescoSDK.xcodeproj -target AlfrescoSDK -configuration Debug clean build

# Build documentation if appledoc is installed
if type -p appledoc &>/dev/null; then
appledoc --project-name AlfrescoSDK --project-company "Alfresco" --company-id com.alfresco.alfrescosdk --output ./AlfrescoSDK/help --keep-intermediate-files --exit-threshold 2 --ignore .m --ignore AlfrescoSDKTests . --ignore CMIS .
fi
21 changes: 20 additions & 1 deletion AlfrescoSDK/run_test.sh
Original file line number Diff line number Diff line change
@@ -1 +1,20 @@
xcodebuild -sdk iphonesimulator -project AlfrescoSDK.xcodeproj -target AlfrescoSDKTests -configuration Debug build
#!/bin/bash

# remove previous test reports
if [ -d test-reports ]
then
echo "Removing previous test-reports folder..."
rm -R test-reports
fi

# define the main command
# TODO: Find a way to override the project TEST_AFTER_BUILD setting and set to YES
BUILD_CMD="xcodebuild -sdk iphonesimulator -project AlfrescoSDK.xcodeproj -target AlfrescoSDKTests -configuration Debug build"

# determine whether to pipe the unit tests results or not
if [[ "$1" == "-output-junit-results" ]] ; then
echo "Tests are running, output is being piped to ocunit2junit, results will appear soon..."
$BUILD_CMD | ocunit2junit
else
$BUILD_CMD
fi

0 comments on commit e922fb7

Please sign in to comment.