This repository has been archived by the owner on Apr 3, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c30004
commit 695b2a1
Showing
6 changed files
with
137 additions
and
109 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ x86/ | |
bld/ | ||
[Bb]in/ | ||
[Oo]bj/ | ||
unit-test-tools | ||
|
||
# Visual Studio 2015 cache/options directory | ||
.vs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
TOUCH_SERVER=unit-test-tools/Touch.Server.exe | ||
TEST_RESULT=./test_results.xml | ||
MTOUCH=/Developer/MonoTouch/usr/bin/mtouch | ||
UNIT_SUMMARY=unit-test-tools/nunit-summary.exe | ||
THIS_FILE := $(lastword $(MAKEFILE_LIST)) | ||
PROJECT_FILE=Connectivity.Tests.iOS.csproj | ||
APP_NAME=ConnectivityTestsiOS.app | ||
|
||
all: build-simulator build-device | ||
|
||
run-all-tests: run-simulator run-device | ||
|
||
build-simulator: | ||
msbuild $(PROJECT_FILE) /t:Rebuild | ||
|
||
build-device: | ||
msbuild $(PROJECT_FILE) /t:ReBuild /p:Platform=iPhone | ||
|
||
run-simulator-tests: download-server build-simulator | ||
mono --debug $(TOUCH_SERVER) \ | ||
--launchsim ./bin/iPhoneSimulator/Debug/$(APP_NAME) \ | ||
-autoexit -skipheader \ | ||
-logfile=$(TEST_RESULT) \ | ||
--verbose \ | ||
--device=":v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-11-2,devicetype=com.apple.CoreSimulator.SimDeviceType.iPhone-SE" | ||
@$(MAKE) -f $(THIS_FILE) show-results | ||
|
||
run-device-tests: download-server build-device | ||
$(MTOUCH) --installdev ./bin/iPhone/Debug/$(APP_NAME) | ||
mono --debug $(TOUCH_SERVER) --launchdev com.plugin.connectivity -autoexit -skipheader -logfile=$(TEST_RESULT) | ||
@$(MAKE) -f $(THIS_FILE) show-results | ||
|
||
show-results: | ||
mono $(UNIT_SUMMARY) $(TEST_RESULT) | ||
rm -rf $(TEST_RESULT) | ||
|
||
download-server: | ||
@if ! test -f $(TOUCH_SERVER); then \ | ||
curl -L -O "https://github.com/prashantvc/Touch.Server/releases/download/0.1/Touch.Server.exe" > Touch.Server.exe; \ | ||
mkdir unit-test-tools; \ | ||
mv Touch.Server.exe $(TOUCH_SERVER); \ | ||
fi | ||
|
||
@if ! test -f $(UNIT_SUMMARY); then \ | ||
curl -L -O "https://github.com/prashantvc/nunit-summary/releases/download/0.4/nunit-summary.exe" > nunit-summary.exe; \ | ||
mv nunit-summary.exe $(UNIT_SUMMARY); \ | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/sh | ||
|
||
echo 'Output path = ' $1 | ||
|
||
TEST_RESULT=$1/test_results.xml | ||
TOUCH_SERVER=unit-test-tools/Touch.Server.exe | ||
|
||
|
||
echo 'Delete test result' | ||
rm -rf $TEST_RESULT | ||
|
||
#downloading touch.server | ||
if [ ! -f $TOUCH_SERVER ]; then | ||
echo "Touch server doesn't exists" | ||
curl -L -O "https://github.com/prashantvc/Touch.Server/releases/download/0.1/Touch.Server.exe" > Touch.Server.exe | ||
mkdir unit-test-tools | ||
mv Touch.Server.exe $TOUCH_SERVER | ||
fi; | ||
|
||
mono --debug $TOUCH_SERVER \ | ||
--launchsim ./bin/iPhoneSimulator/Debug/ConnectivityTestsiOS.app \ | ||
-autoexit \ | ||
-skipheader \ | ||
-logfile=$TEST_RESULT \ | ||
--verbose \ | ||
--device=":v2:runtime=com.apple.CoreSimulator.SimRuntime.iOS-11-2,devicetype=com.apple.CoreSimulator.SimDeviceType.iPhone-SE" |
Oops, something went wrong.