|
12 | 12 | flavor: {{ platform.flavor }} |
13 | 13 | variables: |
14 | 14 | EDITOR_VERSION: {{ editor.version }} |
15 | | - commands: |
| 15 | + commands: |
16 | 16 | - {{ utr_install_win }} |
17 | 17 | - {{ upm_ci_install }} |
18 | 18 | # Get version 2.3.0-preview of doctools package (it currently fails for 3.0.0-preview). |
|
26 | 26 | - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/ |
27 | 27 | # Run upm-ci verification tests as well as tests contained in the package. |
28 | 28 | - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u %EDITOR_VERSION% |
29 | | - {% if platform.name == "win" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" |
| 29 | + {% if platform.name == "win" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" |
30 | 30 | --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package" {% endif %} |
31 | 31 | {% if platform.installscript %} |
32 | 32 | - {{ unity_downloader_install }} |
|
38 | 38 | - move /Y .\Packages\com.unity.inputsystem\Samples.meta .\Assets |
39 | 39 | # Now run our full test suite that sits in Assets/Tests by running UTR on our project. |
40 | 40 | - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "win" %} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem {% if platform.name == "win" %}--enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project {% endif %} |
| 41 | + # Merge all the code coverage results into one report. |
| 42 | + {% if platform.name == "win" %} |
| 43 | + - '{{ yamato_source_dir_win }}/.Editor/Unity.exe -projectPath {{ yamato_source_dir_win }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_win }}/Packages/com.unity.inputsystem/" -quit' |
| 44 | + #delete the reports from the two runs and only keep the final merged one |
| 45 | + - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Package" |
| 46 | + - rmdir /s/q "{{ yamato_source_dir_win }}/upm-ci~/test-results/CodeCoverage/Project" |
| 47 | + {% endif %} |
41 | 48 | after: |
42 | 49 | - {{ instabilities_install_win }} |
43 | 50 | - {{ instabilities_run_win }} |
|
70 | 77 | - mv ./Assets/Samples.meta ./Packages/com.unity.inputsystem |
71 | 78 | - upm-ci package pack --package-path ./Packages/com.unity.inputsystem/ |
72 | 79 | # Run upm-ci verification tests as well as tests contained in the package. |
73 | | - - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package" {% endif %} |
| 80 | + - upm-ci package test --package-path ./Packages/com.unity.inputsystem/ -u $EDITOR_VERSION {% if platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --code-coverage-options "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;pathReplacePatterns:@*,,Library/PackageCache,Packages" --extra-utr-arg="--coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package" {% endif %} |
74 | 81 | {% if platform.installscript %} |
75 | 82 | - {{ unity_downloader_install }} |
76 | 83 | - {{ platform.installscript }} $EDITOR_VERSION |
|
81 | 88 | - mv ./Packages/com.unity.inputsystem/Samples.meta ./Assets |
82 | 89 | # Now run our full test suite that sits in Assets/Tests by running UTR on our project. |
83 | 90 | - ./utr --testproject . --timeout=1200 --editor-location=.Editor --artifacts_path=upm-ci~/test-results/isolation-com.unity.inputsystem.tests --suite=playmode {% if platform.name == "mac" or platform.name == "linux"%} --suite=editor {% endif %} {% if category.name == "performance" %} --category=Performance {% endif %} --api-profile=NET_4_6 {% if platform.runtime %} --platform {{ platform.runtime }} {% endif %} {% if platform.scripting-backend %} --scripting-backend {{ platform.scripting-backend }} {% endif %} --report-performance-data --performance-project-id=InputSystem {% if platform.name == "mac" or platform.name == "linux" %} --enable-code-coverage --coverage-options="generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem" --coverage-results-path={{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project {% endif %} |
| 91 | + # Merge all the code coverage results into one report. |
| 92 | + {% if platform.name == "mac" %} |
| 93 | + - '{{ yamato_source_dir_nix }}/.Editor/Unity.app/Contents/MacOS/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit' |
| 94 | + {% endif %} |
| 95 | + {% if platform.name == "linux" %} |
| 96 | + - '{{ yamato_source_dir_nix }}/.Editor/Unity -projectPath {{ yamato_source_dir_nix }} -batchmode -debugCodeOptimization -enableCodeCoverage -coverageResultsPath {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/ -coverageOptions "generateAdditionalMetrics;generateHtmlReport;assemblyFilters:+Unity.InputSystem;sourcePaths:{{ yamato_source_dir_nix }}/Packages/com.unity.inputsystem/" -quit' |
| 97 | + {% endif %} |
| 98 | + - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Package |
| 99 | + - rm -rf {{ yamato_source_dir_nix }}/upm-ci~/test-results/CodeCoverage/Project |
84 | 100 | after: |
85 | 101 | - {{ instabilities_install_nix }} |
86 | 102 | - {{ platform.instabilities_run }} |
|
0 commit comments