@@ -20,25 +20,24 @@ trap trap_exit EXIT
20
20
docker exec " $CONTAINER_NAME " powershell " [System.Environment]::SetEnvironmentVariable('TEST_PLATFORM','$PARAM_TEST_PLATFORM ', [System.EnvironmentVariableTarget]::Machine)"
21
21
22
22
# Run the tests.
23
- docker exec " $CONTAINER_NAME " powershell ' & "C:\Program Files\Unity\Hub\Editor\*\Editor\Unity.exe" -batchmode -nographics -projectPath $Env:PROJECT_PATH -runTests -testPlatform $Env:TEST_PLATFORM -testResults "C:/results.xml" -logfile | Out-Host'
23
+ docker exec " $CONTAINER_NAME " powershell ' & "C:\Program Files\Unity\Hub\Editor\*\Editor\Unity.exe" -batchmode -nographics -projectPath $Env:PROJECT_PATH -runTests -testPlatform $Env:TEST_PLATFORM -testResults "C:/test/ results.xml" -logfile | Out-Host'
24
24
25
25
# Install JDK to run Saxon.
26
26
docker exec " $CONTAINER_NAME " powershell ' choco upgrade jdk8 --no-progress -y'
27
27
28
28
# Download and extract Saxon-B.
29
- docker exec " $CONTAINER_NAME " powershell ' Invoke-WebRequest -Uri "https://versaweb.dl.sourceforge.net/project/saxon/Saxon-B/9.1.0.8/saxonb9-1-0-8j.zip" -Method "GET" -OutFile "C:/saxonb.zip"'
30
- docker exec " $CONTAINER_NAME " powershell " Expand-Archive -Force C:/saxonb.zip C:/saxonb"
29
+ docker exec " $CONTAINER_NAME " powershell ' Invoke-WebRequest -Uri "https://versaweb.dl.sourceforge.net/project/saxon/Saxon-B/9.1.0.8/saxonb9-1-0-8j.zip" -Method "GET" -OutFile "C:/test/ saxonb.zip"'
30
+ docker exec " $CONTAINER_NAME " powershell " Expand-Archive -Force C:/test/ saxonb.zip C:/test /saxonb"
31
31
32
32
# Copy the Saxon-B template to the container.
33
- printf ' %s\n' " $DEPENDENCY_NUNIT_TRANSFORM " > " $base_dir /nunit3-junit.xslt"
34
- docker cp " $base_dir " /nunit3-junit.xslt " $CONTAINER_NAME " :C:/nunit3-junit.xslt
33
+ printf ' %s\n' " $DEPENDENCY_NUNIT_TRANSFORM " > " $base_dir /test/nunit3-junit.xslt"
35
34
36
35
# Parse Unity's results xml to JUnit format.
37
- docker exec " $CONTAINER_NAME " powershell ' java -jar C:/saxonb/saxon9.jar -s C:/results.xml -xsl C:/nunit3-junit.xslt > C:/$Env:TEST_PLATFORM- junit-results.xml'
36
+ docker exec " $CONTAINER_NAME " powershell ' java -jar C:/test/ saxonb/saxon9.jar -s C:/test/ results.xml -xsl C:/test/ nunit3-junit.xslt > C:/test/ junit-results.xml'
38
37
39
38
# Convert CRLF to LF otherwise CircleCI won't be able to read the results.
40
39
# https://stackoverflow.com/a/48919146
41
- docker exec " $CONTAINER_NAME " powershell ' ((Get-Content C:/playmode- junit-results.xml) -join "`n") + "`n" | Set-Content -NoNewline -Encoding utf8 C:/playmode- junit-results-lf.xml'
40
+ docker exec " $CONTAINER_NAME " powershell ' ((Get-Content C:/test/ junit-results.xml) -join "`n") + "`n" | Set-Content -NoNewline -Encoding utf8 C:/test/ junit-results-lf.xml'
42
41
43
- # Copy test results to the host .
44
- docker cp " $CONTAINER_NAME " : " $PARAM_TEST_PLATFORM " - junit-results-lf.xml " $unity_project_full_path " /" $PARAM_TEST_PLATFORM " -junit-results.xml
42
+ # Move test results to project folder for upload .
43
+ mv " $base_dir " /test/ junit-results-lf.xml " $unity_project_full_path " /" $PARAM_TEST_PLATFORM " -junit-results.xml
0 commit comments