uno/build/ios-uitest-run.sh

62 строки
2.3 KiB
Bash
Исходник Обычный вид История

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
2019-12-12 16:19:19 +03:00
## Preemptively start the simulator
2019-09-26 22:52:33 +03:00
/Applications/Xcode.app/Contents/Developer/Applications/Simulator.app/Contents/MacOS/Simulator &
cd $BUILD_SOURCESDIRECTORY
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
export SCREENSHOTS_FOLDERNAME=ios-Snap
# CommandBar disabled: https://github.com/unoplatform/uno/issues/1955
2019-12-09 16:01:11 +03:00
# runGroup is used to parallelize the snapshots tests on multiple agents
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-09 16:01:11 +03:00
and Description =~ 'runGroup:$UITEST_SNAPSHOTS_GROUP' \
"
2019-12-03 22:58:33 +03:00
else
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 \
2019-12-10 04:30:15 +03:00
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.TextBlockTests' or \
namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ImageTests'
"
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_SCREENSHOT_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/screenshots/$SCREENSHOTS_FOLDERNAME
mkdir -p $UNO_UITEST_SCREENSHOT_PATH
2019-12-03 21:13:28 +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 \
--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