Skip to content

Commit

Permalink
Added additional make commands 'test-ui' which runs only playmode tes…
Browse files Browse the repository at this point in the history
…ts and 'test-sdk' which runs only editmode tests
  • Loading branch information
BellringerQuinn committed Sep 21, 2023
1 parent e0ce854 commit dcffbce
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,16 @@ test:
echo "" && \
echo "Play mode Test results: " && \
head -n 2 TestResults_Play.xml | grep -Eo 'result="[^"]+"|total="[^"]+"|passed="[^"]+"|failed="[^"]+"|inconclusive="[^"]+"|skipped="[^"]+"|start-time="[^"]+"|end-time="[^"]+"|duration="[^"]+"' | grep -Ev 'clr-version=|engine-version=|asserts=|id=|testcasecount=' | sed -E 's/^[^"]+"([^"]+)"[^"]+"([^"]+)".*/\1: \2/'

test-ui:
rm TestResults*.xml ; \
Unity -runTests -projectPath "$(pwd)" -testPlatform playmode -testResults TestResults_Play.xml ; \
echo "Play mode Test results: " && \
head -n 2 TestResults_Play.xml | grep -Eo 'result="[^"]+"|total="[^"]+"|passed="[^"]+"|failed="[^"]+"|inconclusive="[^"]+"|skipped="[^"]+"|start-time="[^"]+"|end-time="[^"]+"|duration="[^"]+"' | grep -Ev 'clr-version=|engine-version=|asserts=|id=|testcasecount=' | sed -E 's/^[^"]+"([^"]+)"[^"]+"([^"]+)".*/\1: \2/'

test-sdk:
rm TestResults*.xml ; cd ./testchain && (yarn start:hardhat & echo $$! > .pid) && cd .. && \
Unity -batchmode -runTests -projectPath "$(pwd)" -testPlatform editmode -testResults TestResults_Edit.xml ; Unity -quit && \
make stop && \
echo "Edit mode Test results: " && \
head -n 2 TestResults_Edit.xml | grep -Eo 'result="[^"]+"|total="[^"]+"|passed="[^"]+"|failed="[^"]+"|inconclusive="[^"]+"|skipped="[^"]+"|start-time="[^"]+"|end-time="[^"]+"|duration="[^"]+"' | grep -Ev 'clr-version=|engine-version=|asserts=|id=|testcasecount=' | sed -E 's/^[^"]+"([^"]+)"[^"]+"([^"]+)".*/\1: \2/'

0 comments on commit dcffbce

Please sign in to comment.