2019-09-26 22:52:33 +03:00
|
|
|
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
IFS=$'\n\t'
|
|
|
|
|
|
|
|
echo "Listing iOS simulators"
|
|
|
|
xcrun simctl list devices --json
|
|
|
|
|
|
|
|
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator &
|
|
|
|
|
|
|
|
cd $BUILD_SOURCESDIRECTORY
|
|
|
|
|
|
|
|
msbuild /r /p:Configuration=Release $BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.iOS/SamplesApp.iOS.csproj
|
|
|
|
msbuild /r /p:Configuration=Release $BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.UITests/SamplesApp.UITests.csproj
|
|
|
|
|
|
|
|
cd $BUILD_SOURCESDIRECTORY/build
|
|
|
|
|
|
|
|
mono nuget/nuget.exe install NUnit.ConsoleRunner -Version 3.10.0
|
|
|
|
|
2019-12-03 22:58:33 +03:00
|
|
|
if [ "$UITEST_SNAPSHOTS_ONLY" == 'true' ];
|
2019-12-03 21:13:28 +03:00
|
|
|
then
|
2019-12-04 16:52:10 +03:00
|
|
|
export SCREENSHOTS_FOLDERNAME=ios-Snap
|
2019-12-03 22:58:33 +03:00
|
|
|
export TEST_FILTERS="namespace == 'SamplesApp.UITests.Snap'"
|
|
|
|
else
|
2019-12-04 16:52:10 +03:00
|
|
|
export SCREENSHOTS_FOLDERNAME=ios
|
2019-12-03 22:58:33 +03:00
|
|
|
export TEST_FILTERS=" \
|
2019-11-01 05:12:20 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ButtonTests' or \
|
|
|
|
namespace = 'SamplesApp.UITests' or \
|
2019-11-12 19:33:53 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Input.VisualState_Tests' or \
|
2019-11-14 01:34:40 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.FlyoutTests' or \
|
2019-11-21 18:45:38 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.DatePickerTests' or \
|
2019-11-25 23:30:29 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ListViewTests' or \
|
2019-11-27 17:54:09 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Media.Animation_Tests' or \
|
2019-12-03 23:40:38 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ControlTests' or \
|
2019-11-25 23:30:29 +03:00
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.TextBlockTests' \
|
2019-12-03 21:13:28 +03:00
|
|
|
"
|
|
|
|
fi
|
|
|
|
|
2019-12-04 16:52:10 +03:00
|
|
|
export UNO_UITEST_PLATFORM=iOS
|
|
|
|
export UNO_UITEST_IOSBUNDLE_PATH=$BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.iOS/bin/iPhoneSimulator/Release/SamplesApp.app
|
|
|
|
export UNO_UITEST_SCREENSHOT_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/$SCREENSHOTS_FOLDERNAME
|
|
|
|
|
|
|
|
mkdir -p $UNO_UITEST_SCREENSHOT_PATH
|
2019-12-03 21:13:28 +03:00
|
|
|
|
|
|
|
mono $BUILD_SOURCESDIRECTORY/build/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe \
|
|
|
|
--inprocess \
|
|
|
|
--agents=1 \
|
|
|
|
--workers=1 \
|
|
|
|
--where "$TEST_FILTERS" \
|
2019-09-26 22:52:33 +03:00
|
|
|
$BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.UITests/bin/Release/net47/SamplesApp.UITests.dll \
|
|
|
|
|| true
|