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-05 04:29:59 +03:00
|
|
|
export SCREENSHOTS_FOLDERNAME=ios-Snap
|
2019-12-07 00:49:05 +03:00
|
|
|
|
|
|
|
# CommandBar disabled: https://github.com/unoplatform/uno/issues/1955
|
|
|
|
export TEST_FILTERS=" \
|
|
|
|
namespace == 'SamplesApp.UITests.Snap' \
|
2019-12-07 21:50:17 +03:00
|
|
|
and Description !~ 'automated:Uno.UI.Samples.Content.UITests.CommandBar.*' \
|
2019-12-07 00:49:05 +03:00
|
|
|
"
|
2019-12-03 22:58:33 +03:00
|
|
|
else
|
2019-12-05 04:29:59 +03:00
|
|
|
export SCREENSHOTS_FOLDERNAME=ios
|
|
|
|
export TEST_FILTERS=" \
|
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ButtonTests' or \
|
|
|
|
namespace = 'SamplesApp.UITests' or \
|
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Input.VisualState_Tests' or \
|
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.FlyoutTests' or \
|
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.DatePickerTests' or \
|
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ListViewTests' or \
|
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Media.Animation_Tests' or \
|
|
|
|
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ControlTests' or \
|
|
|
|
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
|
|
|
|
2019-12-05 00:50:54 +03:00
|
|
|
# Move to the screenshot directory so that the output path is the proper one, as
|
|
|
|
# required by Xamarin.UITest
|
|
|
|
cd $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 \
|
2019-12-05 04:29:59 +03:00
|
|
|
--result=$BUILD_SOURCESDIRECTORY/build/TestResult.xml \
|
2019-12-03 21:13:28 +03:00
|
|
|
--where "$TEST_FILTERS" \
|
2019-09-26 22:52:33 +03:00
|
|
|
$BUILD_SOURCESDIRECTORY/src/SamplesApp/SamplesApp.UITests/bin/Release/net47/SamplesApp.UITests.dll \
|
|
|
|
|| true
|