-
Notifications
You must be signed in to change notification settings - Fork 416
/
test.sh
executable file
·29 lines (29 loc) · 1.05 KB
/
test.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env bash
set -eo pipefail
cd "$(dirname "$0")"
if [[ "${SKIP_TEST_BUILD:=false}" == "false" ]]; then
./build.sh $c
fi
if [[ -d "MoreLinq.Test/TestResults" ]]; then
rm -rf MoreLinq.Test/TestResults
fi
if [[ -z "$1" ]]; then
configs="Debug Release"
else
configs="$1"
fi
for f in net6.0 net8.0 net9.0; do
for c in $configs; do
dotnet test --no-build -c $c -f $f --settings MoreLinq.Test/coverlet.runsettings MoreLinq.Test
TEST_RESULTS_DIR="$(ls -dc MoreLinq.Test/TestResults/* | head -1)"
cp "$TEST_RESULTS_DIR/coverage.opencover.xml" "MoreLinq.Test/TestResults/coverage-$f-$c.opencover.xml"
done
done
dotnet reportgenerator -reports:MoreLinq.Test/TestResults/coverage-*.opencover.xml \
-reporttypes:Html\;TextSummary \
-targetdir:MoreLinq.Test/TestResults/reports
cat MoreLinq.Test/TestResults/reports/Summary.txt
for f in net8.0 net9.0; do
dotnet publish -f $f MoreLinq.Test.Aot
"$(find MoreLinq.Test.Aot -type d -name publish | grep -F $f)/MoreLinq.Test.Aot"
done