File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 required : true
1010 build-args :
1111 description : Additional build args.
12- required : true
12+ required : false
13+ default : " "
1314 artifact-name :
1415 description : Artifact name for uploaded UTP logs (must be unique per matrix job).
1516 required : false
Original file line number Diff line number Diff line change @@ -6,6 +6,17 @@ BUILD_TARGET=${BUILD_TARGET:?BUILD_TARGET is required}
66BUILD_ARGS=${BUILD_ARGS:- }
77TESTS_INPUT=${TESTS_INPUT:- }
88
9+ if printf ' %s' " $BUILD_ARGS " | grep -qE ' [;&`|]' ; then
10+ echo " ::error::BUILD_ARGS contains disallowed shell metacharacters"
11+ exit 1
12+ fi
13+
14+ build_args=()
15+ if [ -n " $BUILD_ARGS " ]; then
16+ # Split on whitespace into an array without invoking the shell
17+ read -r -a build_args <<< " $BUILD_ARGS"
18+ fi
19+
920IFS=' ,' read -ra tests <<< " $TESTS_INPUT"
1021failures=0
1122
@@ -86,7 +97,7 @@ for raw_test in "${tests[@]}"; do
8697 build_rc=0
8798
8899 unity-cli run --log-name " ${test_name} -Validate" -quit -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.ValidateProject -importTMProEssentialsAsset || validate_rc=$?
89- unity-cli run --log-name " ${test_name} -Build" -buildTarget " $BUILD_TARGET " -quit -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild -sceneList Assets/Scenes/SampleScene.unity $BUILD_ARGS || build_rc=$?
100+ unity-cli run --log-name " ${test_name} -Build" -buildTarget " $BUILD_TARGET " -quit -executeMethod Utilities.Editor.BuildPipeline.UnityPlayerBuildTools.StartCommandLineBuild -sceneList Assets/Scenes/SampleScene.unity " ${build_args[@]} " || build_rc=$?
90101
91102 expected=${expected_status[$test_name]:- 0}
92103 exp_msg=${expected_message[$test_name]:- }
You can’t perform that action at this time.
0 commit comments