From e12c9e370dcae56913c8fc46e514f9da7b50314e Mon Sep 17 00:00:00 2001 From: Nick Maltbie Date: Mon, 18 Apr 2022 21:16:23 -0400 Subject: [PATCH] Updated run_tests.sh script to simplfy some parameters --- dist/steps/run_tests.sh | 62 +++++++---------------------------------- 1 file changed, 10 insertions(+), 52 deletions(-) diff --git a/dist/steps/run_tests.sh b/dist/steps/run_tests.sh index fd5d73f..204f5cb 100755 --- a/dist/steps/run_tests.sh +++ b/dist/steps/run_tests.sh @@ -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