This repository was archived by the owner on Jul 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-29
lines changed
Expand file tree Collapse file tree 3 files changed +17
-29
lines changed Original file line number Diff line number Diff line change @@ -288,3 +288,5 @@ __queuestorage__
288288
289289# Gitleaks report
290290gitleaks-report.json
291+
292+ coverage /
Original file line number Diff line number Diff line change @@ -65,12 +65,13 @@ test: # Run all the test tasks @Testing
6565 test-load
6666
6767_test :
68- set -e
69- script=" ./scripts/tests/${name} .sh"
70- if [ -e " $$ {script}" ]; then
71- exec $$ {script}
72- else
73- echo " make test-${name} not implemented: $$ {script} not found" >&2
68+ @set -e; \
69+ script=" ./scripts/tests/$( name) .sh" ; \
70+ if [ -e " $$ script" ]; then \
71+ exec " $$ script" ; \
72+ else \
73+ echo " make test-$( name) not implemented: $$ script not found" >&2 ; \
74+ exit 1; \
7475 fi
7576
7677${VERBOSE}.SILENT : \
Original file line number Diff line number Diff line change 11#! /bin/bash
2-
32set -euo pipefail
43
5- cd " $( git rev-parse --show-toplevel) "
6-
7- dir=" $PWD "
8- UnitDir=" $dir /tests/"
9- ResDir=" $UnitDir " results-unit
10- Format=" trx"
11-
12- # Find all *.csproj files excluding the IntegrationTests folder and execute dotnet test, with build for now
13- find " $UnitDir " -name ' *.csproj' -not -path " $UnitDir /IntegrationTests/*" | while read -r file; do
14- echo -e " \nRunning unit tests for:\n$file "
15- dotnet test " $file " --filter " TestCategory!=Integration" --logger $Format --verbosity quiet
16- done
17-
4+ COVERAGE_DIR=" coverage"
5+ TEST_PROJECTS=$( find tests -name ' *.csproj' )
186
19- # Move all trx result files into a separate folder, for easier reporting
20- mkdir -p " $ResDir "
21- find " $UnitDir " -name " *.$Format " -not -path " $ResDir /*" | while read -r resfile; do
22- mv " $resfile " " $ResDir "
7+ for proj in $TEST_PROJECTS ; do
8+ echo " 🧪 Running tests for $proj ..."
9+ dotnet test " $proj " \
10+ --collect:" XPlat Code Coverage" \
11+ --results-directory " $COVERAGE_DIR /$( basename " $proj " .csproj) "
2312done
2413
25- # List created results
26- echo -e " \nCreated result files:\n"
27- find " $ResDir " -name " *.$Format "
28-
29- # echo "Test execution completed. See scripts/tests/unit.sh for more."
14+ echo " ✅ All tests completed. Coverage reports in $COVERAGE_DIR /"
You can’t perform that action at this time.
0 commit comments