Updated run_tests.sh script to simplfy some parameters

pull/182/head
Nick Maltbie 2022-04-18 21:16:23 -04:00
parent 41bec93f8a
commit e12c9e370d
1 changed files with 10 additions and 52 deletions

View File

@ -27,27 +27,6 @@ FULL_COVERAGE_RESULTS_PATH=$GITHUB_WORKSPACE/$COVERAGE_RESULTS_PATH
echo "Using custom parameters $CUSTOM_PARAMETERS."
#
# Set and display the coverage results path
#
# Set the modes for testing
case $TEST_MODE in
editmode)
echo "Edit mode selected for testing."
EDIT_MODE=true
;;
playmode)
echo "Play mode selected for testing."
PLAY_MODE=true
;;
*)
echo "All modes selected for testing."
EDIT_MODE=true
PLAY_MODE=true
;;
esac
# The following tests are 2019 mode (requires Unity 2019.2.11f1 or later)
# Reference: https://docs.unity3d.com/2019.3/Documentation/Manual/CommandLineArguments.html
@ -123,35 +102,14 @@ for $platform in "${test_platforms[@]}"; do
if [ $TEST_EXIT_CODE -gt 0 ]; then
TEST_RUNNER_EXIT_CODE=$TEST_EXIT_CODE
fi
fi
#
# Results
#
echo ""
echo "###########################"
echo "# Project directory #"
echo "###########################"
echo ""
ls -alh $UNITY_PROJECT_PATH
if [ "$EDIT_MODE" = "true" ]; then
echo ""
echo "###########################"
echo "# Edit Mode Results #"
echo "###########################"
echo ""
cat "$FULL_ARTIFACTS_PATH/editmode-results.xml"
cat "$FULL_ARTIFACTS_PATH/editmode-results.xml" | grep test-run | grep Passed
fi
if [ "$PLAY_MODE" = "true" ]; then
echo ""
echo "###########################"
echo "# Play Mode Results #"
echo "###########################"
echo ""
cat "$FULL_ARTIFACTS_PATH/playmode-results.xml"
cat "$FULL_ARTIFACTS_PATH/playmode-results.xml" | grep test-run | grep Passed
echo ""
echo "###########################"
echo "# $platform Results #"
echo "###########################"
echo ""
if [ $platform -ne "COMBINE_RESULTS" ]; then;
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml"
cat "$FULL_ARTIFACTS_PATH/$platform-results.xml" | grep test-run | grep Passed
fi
fi