diff --git a/.yamato/UnityToonShader-test.yml b/.yamato/UnityToonShader-test.yml index 5a6bc5308..657c7af3a 100644 --- a/.yamato/UnityToonShader-test.yml +++ b/.yamato/UnityToonShader-test.yml @@ -95,14 +95,16 @@ win_test_projects: --- + # OSX Metal +{% for runtime_test_platform in osx_runtime_test_platforms %} {% for test_project in osx_test_projects %} {% for unity_editor in test_project.unity_editors %} {% assign project_name = test_project.project_prefix | append: '-' | concat: unity_editor.version %} -{{ project_name }}_OSX_Metal_playmode_mono_Linear: - name: {{ project_name }} on OSX_Metal_playmode_mono_Linear +{{ project_name }}_OSX_Metal_{{ runtime_test_platform.name}}_mono: + name: {{ project_name }} on OSX_Metal {{ runtime_test_platform.name}} mono agent: type: {{ metal_platform.type }} model: {{ metal_platform.model }} @@ -124,7 +126,7 @@ win_test_projects: retries: 2 - command: |5- - ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; echo \$UPM_REGISTRY; cd ~/com.unity.toonshader/TestProjects/{{ project_name }} && ~/com.unity.toonshader/TestProjects/{{ project_name }}/utr --artifacts_path=/Users/bokken/com.unity.toonshader/TestProjects/{{ project_name }}/test-results --editor-location=/Users/bokken/.Editor --extra-editor-arg="-colorspace=Linear" --reruncount=2 --scripting-backend=Mono2x --suite=playmode --testproject=/Users/bokken/com.unity.toonshader/TestProjects/{{ project_name }}" + ssh -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" bokken@$BOKKEN_DEVICE_IP "export UPM_REGISTRY=https://artifactory-slo.bf.unity3d.com/artifactory/api/npm/upm-candidates; echo \$UPM_REGISTRY; cd ~/com.unity.toonshader/TestProjects/{{ project_name }} && ~/com.unity.toonshader/TestProjects/{{ project_name }}/utr --artifacts_path=/Users/bokken/com.unity.toonshader/TestProjects/{{ project_name }}/test-results --editor-location=/Users/bokken/.Editor --extra-editor-arg="-colorspace=Linear" --reruncount=2 --scripting-backend=Mono2x --suite=playmode --platform={{ runtime_test_platform.name}} --testproject=/Users/bokken/com.unity.toonshader/TestProjects/{{ project_name }}" UTR_RESULT=$? mkdir -p TestProjects/{{ project_name }}/test-results/ scp -i ~/.ssh/id_rsa_macmini -o "StrictHostKeyChecking=no" -r bokken@$BOKKEN_DEVICE_IP:/Users/bokken/com.unity.toonshader/TestProjects/{{ project_name }}/test-results/ TestProjects/{{ project_name }}/test-results/ @@ -136,16 +138,17 @@ win_test_projects: - "TestProjects/{{ project_name }}/Logs/*.log" {% endfor %} {% endfor %} - +{% endfor %} # Windows +{% for runtime_test_platform in win_runtime_test_platforms %} {% for test_project in win_test_projects %} {% for unity_editor in test_project.unity_editors %} {% assign project_name = test_project.project_prefix | append: '-' | concat: unity_editor.version %} -{{ project_name }}{{ test_project.key_postfix}}_Win_playmode: - name: {{ project_name }}{{ test_project.key_postfix}} on Win_playmode +{{ project_name }}{{ test_project.key_postfix}}_Win_{{ runtime_test_platform.name}}: + name: {{ project_name }}{{ test_project.key_postfix}} on Win {{ runtime_test_platform.name}} agent: type: {{win_test_platform.type}} image: {{win_test_platform.image}} @@ -164,7 +167,7 @@ win_test_projects: - cd TestProjects/{{ project_name }} && unity-downloader-cli -u {{ unity_editor.version }} -c editor -c il2cpp --wait --published-only # - cd TestProjects/{{ project_name }} && utr --scripting-backend=Mono2x --suite=playmode --suite=playmode --testproject=. --editor-location=.Editor --artifacts_path=test-results {{ test_project.utr_arguments }} --zero-tests-are-ok=1 - - cd TestProjects/{{ project_name }} && utr --suite=playmode --testproject=. --editor-location=.Editor --artifacts_path=test-results {{ test_project.utr_arguments }} + - cd TestProjects/{{ project_name }} && utr --suite=playmode --platform={{ runtime_test_platform.name}} --testproject=. --editor-location=.Editor --artifacts_path=test-results {{ test_project.utr_arguments }} timeout: 360000 retries: 1 artifacts: @@ -174,6 +177,11 @@ win_test_projects: {% endfor %} {% endfor %} + +{% endfor %} + + +# Trigger test_trigger: name: Tests Trigger (Virtual) for {{ yamato_name }} triggers: @@ -185,15 +193,19 @@ test_trigger: rerun: on_new_revision dependencies: + {% for runtime_test_platform in osx_runtime_test_platforms %} {% for test_project in osx_test_projects %} {% for unity_editor in test_project.unity_editors %} {% assign project_name = test_project.project_prefix | append: '-' | concat: unity_editor.version %} - - .yamato/{{ yamato_name }}-test.yml#{{ project_name }}_OSX_Metal_playmode_mono_Linear + - .yamato/{{ yamato_name }}-test.yml#{{ project_name }}_OSX_Metal_{{ runtime_test_platform.name}}_mono {% endfor %} {% endfor %} + {% endfor %} + {% for runtime_test_platform in win_runtime_test_platforms %} {% for test_project in win_test_projects %} {% for unity_editor in test_project.unity_editors %} {% assign project_name = test_project.project_prefix | append: '-' | concat: unity_editor.version %} - - .yamato/{{ yamato_name }}-test.yml#{{ project_name }}{{ test_project.key_postfix}}_Win_playmode + - .yamato/{{ yamato_name }}-test.yml#{{ project_name }}{{ test_project.key_postfix}}_Win_{{ runtime_test_platform.name}} + {% endfor %} {% endfor %} {% endfor %} diff --git a/.yamato/UnityToonShader.metafile b/.yamato/UnityToonShader.metafile index 3d8dbf352..01275720d 100644 --- a/.yamato/UnityToonShader.metafile +++ b/.yamato/UnityToonShader.metafile @@ -42,6 +42,13 @@ platforms: flavor: b1.medium cmd_prefix: +win_runtime_test_platforms: + - name: Editor + - name: StandaloneWindows64 + +osx_runtime_test_platforms: + - name: Editor + - name: StandaloneOSX pack_platform: &pack_platform_linux name: linux diff --git a/com.unity.toon-graphics-test/Editor/Unity.ToonShader.GraphicsTest.Editor.asmdef b/com.unity.toon-graphics-test/Editor/Unity.ToonShader.GraphicsTest.Editor.asmdef index c875c2231..258167eb6 100644 --- a/com.unity.toon-graphics-test/Editor/Unity.ToonShader.GraphicsTest.Editor.asmdef +++ b/com.unity.toon-graphics-test/Editor/Unity.ToonShader.GraphicsTest.Editor.asmdef @@ -5,13 +5,23 @@ "GUID:c081bc530f560634bb5c21d4b323a7f1", "GUID:904fa68f17c579d429af85ad9901cc6a" ], - "includePlatforms": [], + "includePlatforms": [ + "Editor" + ], "excludePlatforms": [], "allowUnsafeCode": false, "overrideReferences": false, "precompiledReferences": [], - "autoReferenced": true, - "defineConstraints": [], - "versionDefines": [], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_TESTS_FRAMEWORK" + ], + "versionDefines": [ + { + "name": "com.unity.toon-graphics-test", + "expression": "", + "define": "UNITY_TESTS_FRAMEWORK" + } + ], "noEngineReferences": false } \ No newline at end of file diff --git a/com.unity.toon-graphics-test/Runtime/Unity.ToonShader.GraphicsTest.asmdef b/com.unity.toon-graphics-test/Runtime/Unity.ToonShader.GraphicsTest.asmdef index 92ba652ba..9f8b3f9cf 100644 --- a/com.unity.toon-graphics-test/Runtime/Unity.ToonShader.GraphicsTest.asmdef +++ b/com.unity.toon-graphics-test/Runtime/Unity.ToonShader.GraphicsTest.asmdef @@ -8,13 +8,15 @@ ], "includePlatforms": [], "excludePlatforms": [], - "allowUnsafeCode": false, + "allowUnsafeCode": true, "overrideReferences": true, "precompiledReferences": [ "nunit.framework.dll" ], - "autoReferenced": true, - "defineConstraints": [], + "autoReferenced": false, + "defineConstraints": [ + "UNITY_TESTS_FRAMEWORK" + ], "versionDefines": [ { "name": "com.unity.render-pipelines.high-definition", @@ -25,6 +27,11 @@ "name": "com.unity.render-pipelines.universal", "expression": "", "define": "UTS_TEST_USE_URP" + }, + { + "name": "com.unity.toon-graphics-test", + "expression": "", + "define": "UNITY_TESTS_FRAMEWORK" } ], "noEngineReferences": false