Skip to content

Commit e1fa124

Browse files
authored
chore: create job for multiprocess tests running on a single node (#1761)
* Multiprocess tests running on a single node * Skip all execution on trunk * Make a run all trigger as well * Remove from all other locations * Run multiprocess tests as part of nightly trigger * Add to Run All trigger and update capitalization of name * move the run all single node multiprocess test definition to the runall file * update nightly trigger
1 parent 7300233 commit e1fa124

File tree

4 files changed

+58
-36
lines changed

4 files changed

+58
-36
lines changed

.yamato/_run-all.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ run_all_tests:
1414
- .yamato/package-tests.yml#test_{{ project.name}}_{{ package.name }}_{{ editor }}_{{ platform.name }}
1515
{% endfor -%}
1616
- .yamato/project-tests.yml#test_{{ project.name }}_{{ editor }}_{{ platform.name }}
17-
- .yamato/project-tests.yml#multiprocess_test_testproject_{{ editor }}_{{ platform.name }}
1817
{% endfor -%}
1918
{% endfor -%}
2019
{% endfor -%}
@@ -45,4 +44,18 @@ all_package_tests:
4544
{% endfor -%}
4645
{% endfor -%}
4746
{% endfor -%}
48-
{% endfor -%}
47+
{% endfor -%}
48+
49+
all_singlenode_multiprocess_tests:
50+
name: Run All Multiprocess Tests - Single Node
51+
dependencies:
52+
# Pull in package and validate jobs through the badges job
53+
{% for platform in test_platforms -%}
54+
{% for project in projects -%}
55+
{% for editor in project.test_editors -%}
56+
{% if editor != "trunk" %}
57+
- .yamato/multiprocess-project-tests.yml#singlenode_multiprocess_test_testproject_{{ editor }}_{{ platform.name }}
58+
{% endif %}
59+
{% endfor -%}
60+
{% endfor -%}
61+
{% endfor -%}

.yamato/_triggers.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ develop_nightly_trigger:
1010
rerun: always
1111
dependencies:
1212
- .yamato/_run-all.yml#run_all_tests
13+
- .yamato/_run-all.yml#all_singlenode_multiprocess_tests
1314
{% for project in projects -%}
1415
- .yamato/code-coverage.yml#code_coverage_win_{{ project.name }}
1516
{% endfor -%}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{% metadata_file .yamato/project.metafile %}
2+
---
3+
4+
{% for project in projects -%}
5+
{% if project.name == "testproject" %}
6+
{% for editor in project.test_editors -%}
7+
{% for platform in test_platforms -%}
8+
singlenode_multiprocess_test_testproject_{{ editor }}_{{ platform.name }}:
9+
name : Multiprocess Tests - {{ editor }} on {{ platform.name }}
10+
agent:
11+
type: {{ platform.type }}
12+
image: {{ platform.image }}
13+
flavor: {{ platform.flavor}}
14+
commands:
15+
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
16+
{% if editor != "trunk" %}
17+
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
18+
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr{% if platform.name == "win" %}.bat --output utr.bat{% endif %}{% if platform.name != "win" %} --output utr && chmod +x ./utr{% endif %}
19+
- {{ platform.editorpath }} -projectpath testproject -batchmode -nographics -quit -logfile BuildMultiprocessTestPlayer.log -executeMethod Unity.Netcode.MultiprocessRuntimeTests.BuildMultiprocessTestPlayer.BuildRelease
20+
{% if platform.name == "mac" %} - sudo codesign --force --deep --sign - ./testproject/Builds/MultiprocessTests/MultiprocessTestPlayer.app{% endif %}
21+
- {{ platform.utr }} --suite=playmode --testproject=testproject --editor-location=.Editor --testfilter=Unity.Netcode.MultiprocessRuntimeTests --extra-editor-arg=-bypassIgnoreUTR
22+
{% endif %}
23+
after:
24+
- echo "After block"
25+
{% if editor != "trunk" %}
26+
{% if platform.name == "win" %} - copy %USERPROFILE%\.multiprocess\logfile* .{% endif %}
27+
{% if platform.name != "win" %} - cp $HOME/.multiprocess/logfile* .{% endif %}
28+
{% endif %}
29+
artifacts:
30+
logs:
31+
paths:
32+
- "upm-ci~/test-results/**/*"
33+
- BuildMultiprocessTestPlayer.log
34+
- "logfile*"
35+
- "*.log"
36+
- "*.txt"
37+
dependencies:
38+
- .yamato/project-pack.yml#pack_{{ project.name }}
39+
{% endfor -%}
40+
{% endfor -%}
41+
{% endif -%}
42+
{% endfor -%}

.yamato/project-tests.yml

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -55,37 +55,3 @@ test_{{ project.name }}_{{ editor }}_{{ platform.name }}:
5555
{% endfor -%}
5656
{% endfor -%}
5757

58-
{% for project in projects -%}
59-
{% if project.name == "testproject" %}
60-
{% for editor in project.test_editors -%}
61-
{% for platform in test_platforms -%}
62-
multiprocess_test_testproject_{{ editor }}_{{ platform.name }}:
63-
name : multiprocess tests - {{ editor }} on {{ platform.name }}
64-
agent:
65-
type: {{ platform.type }}
66-
image: {{ platform.image }}
67-
flavor: {{ platform.flavor}}
68-
commands:
69-
- pip install unity-downloader-cli --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
70-
- unity-downloader-cli -u {{ editor }} -c editor -w --fast
71-
- curl -s https://artifactory.prd.it.unity3d.com/artifactory/unity-tools-local/utr-standalone/utr{% if platform.name == "win" %}.bat --output utr.bat{% endif %}{% if platform.name != "win" %} --output utr && chmod +x ./utr{% endif %}
72-
- {{ platform.editorpath }} -projectpath testproject -batchmode -nographics -quit -logfile BuildMultiprocessTestPlayer.log -executeMethod Unity.Netcode.MultiprocessRuntimeTests.BuildMultiprocessTestPlayer.BuildRelease
73-
{% if platform.name == "mac" %} - sudo codesign --force --deep --sign - ./testproject/Builds/MultiprocessTests/MultiprocessTestPlayer.app{% endif %}
74-
- {{ platform.utr }} --suite=playmode --testproject=testproject --editor-location=.Editor --testfilter=Unity.Netcode.MultiprocessRuntimeTests --extra-editor-arg=-bypassIgnoreUTR
75-
after:
76-
{% if platform.name == "win" %} - copy %USERPROFILE%\.multiprocess\logfile* .{% endif %}
77-
{% if platform.name != "win" %} - cp $HOME/.multiprocess/logfile* .{% endif %}
78-
artifacts:
79-
logs:
80-
paths:
81-
- "upm-ci~/test-results/**/*"
82-
- BuildMultiprocessTestPlayer.log
83-
- "logfile*"
84-
- "*.log"
85-
- "*.txt"
86-
dependencies:
87-
- .yamato/project-pack.yml#pack_{{ project.name }}
88-
{% endfor -%}
89-
{% endfor -%}
90-
{% endif -%}
91-
{% endfor -%}

0 commit comments

Comments
 (0)