Skip to content

Commit 03abcd1

Browse files
Output all test data to output directory.
So we don't mix up the input and outputs from our tests.
1 parent 5436f81 commit 03abcd1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+146
-129
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ tests/**/*.tif
5454
tests/**/*.tiff
5555
tests/**/*.iff
5656
tests/**/*.png
57+
tests/output/
5758

5859
external/build/*
5960
external/build_*maya*/*

scripts/build_mmSolver_linux_maya2026.bash

100755100644
File mode changed.

tests/output/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Test Suite Output
2+
3+
This directory contains all the output from running tests.
4+
5+
The data in this directory is not committed to Git.

tests/test/baseutils.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ def get_data_root(self):
9292
path = os.path.abspath(path)
9393
return path
9494

95+
def get_output_root(self):
96+
path = os.path.join(os.path.dirname(__file__), '..', 'output')
97+
path = os.path.abspath(path)
98+
return path
99+
95100
def get_profile_root(self):
96101
path = os.path.join(os.path.dirname(__file__), '..', 'profile')
97102
path = os.path.abspath(path)
@@ -103,6 +108,12 @@ def get_data_path(self, *args):
103108
path = os.path.abspath(path)
104109
return path
105110

111+
def get_output_path(self, *args):
112+
root = self.get_output_root()
113+
path = os.path.join(root, *args)
114+
path = os.path.abspath(path)
115+
return path
116+
106117
def get_profile_path(self, *args):
107118
root = self.get_profile_root()
108119
path = os.path.join(root, *args)

tests/test/test_api/test_camera_solve_garage.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def solve_garage(
211211

212212
# save the output
213213
file_name = '{}_before.ma'.format(name)
214-
path = self.get_data_path(file_name)
214+
path = self.get_output_path(file_name)
215215
maya.cmds.file(rename=path)
216216
maya.cmds.file(save=True, type='mayaAscii', force=True)
217217

@@ -224,7 +224,7 @@ def solve_garage(
224224

225225
# save the output
226226
file_name = '{}_after.ma'.format(name)
227-
path = self.get_data_path(file_name)
227+
path = self.get_output_path(file_name)
228228
maya.cmds.file(rename=path)
229229
maya.cmds.file(save=True, type='mayaAscii', force=True)
230230
return

tests/test/test_api/test_camera_solve_hcw_painting.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def solve_hcw_painting(
213213

214214
# save the output
215215
file_name = '{}_before.ma'.format(name)
216-
path = self.get_data_path(file_name)
216+
path = self.get_output_path(file_name)
217217
maya.cmds.file(rename=path)
218218
maya.cmds.file(save=True, type='mayaAscii', force=True)
219219

@@ -226,7 +226,7 @@ def solve_hcw_painting(
226226

227227
# save the output
228228
file_name = '{}_after.ma'.format(name)
229-
path = self.get_data_path(file_name)
229+
path = self.get_output_path(file_name)
230230
maya.cmds.file(rename=path)
231231
maya.cmds.file(save=True, type='mayaAscii', force=True)
232232

tests/test/test_api/test_camera_solve_operahouse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def solve_operahouse(
214214

215215
# save the output
216216
file_name = '{}_before.ma'.format(name)
217-
path = self.get_data_path(file_name)
217+
path = self.get_output_path(file_name)
218218
maya.cmds.file(rename=path)
219219
maya.cmds.file(save=True, type='mayaAscii', force=True)
220220

@@ -227,7 +227,7 @@ def solve_operahouse(
227227

228228
# save the output
229229
file_name = '{}_after.ma'.format(name)
230-
path = self.get_data_path(file_name)
230+
path = self.get_output_path(file_name)
231231
maya.cmds.file(rename=path)
232232
maya.cmds.file(save=True, type='mayaAscii', force=True)
233233
return

tests/test/test_api/test_camera_solve_stA.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ def solve_stA(
213213

214214
# save the output
215215
file_name = '{}_before.ma'.format(name)
216-
path = self.get_data_path(file_name)
216+
path = self.get_output_path(file_name)
217217
maya.cmds.file(rename=path)
218218
maya.cmds.file(save=True, type='mayaAscii', force=True)
219219

@@ -226,7 +226,7 @@ def solve_stA(
226226

227227
# save the output
228228
file_name = '{}_after.ma'.format(name)
229-
path = self.get_data_path(file_name)
229+
path = self.get_output_path(file_name)
230230
maya.cmds.file(rename=path)
231231
maya.cmds.file(save=True, type='mayaAscii', force=True)
232232

tests/test/test_api/test_marker_attr_mapping.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def test_find_marker_attr_mapping(self):
170170
assert ret == expected
171171

172172
# Save the output
173-
path = self.get_data_path('find_marker_attr_mapping_after.ma')
173+
path = self.get_output_path('find_marker_attr_mapping_after.ma')
174174
maya.cmds.file(rename=path)
175175
maya.cmds.file(save=True, type='mayaAscii', force=True)
176176
return
@@ -192,7 +192,7 @@ def test_static_attr_correctness_solver_basic(self):
192192
print('pre-solve time:', e - s)
193193

194194
# save the output, before.
195-
path = self.get_data_path(
195+
path = self.get_output_path(
196196
'test_marker_attr_mapping_correctness_solver_basic_before.ma'
197197
)
198198
maya.cmds.file(rename=path)
@@ -209,7 +209,7 @@ def test_static_attr_correctness_solver_basic(self):
209209
mmapi.update_deviation_on_collection(col, solres_list)
210210

211211
# save the output
212-
path = self.get_data_path(
212+
path = self.get_output_path(
213213
'test_marker_attr_mapping_correctness_solver_basic_after.ma'
214214
)
215215
maya.cmds.file(rename=path)
@@ -237,7 +237,7 @@ def test_static_attr_correctness_solver_standard(self):
237237
print('pre-solve time:', e - s)
238238

239239
# save the output, before.
240-
path = self.get_data_path(
240+
path = self.get_output_path(
241241
'test_marker_attr_mapping_correctness_solver_standard_before.ma'
242242
)
243243
maya.cmds.file(rename=path)
@@ -254,7 +254,7 @@ def test_static_attr_correctness_solver_standard(self):
254254
mmapi.update_deviation_on_collection(col, solres_list)
255255

256256
# save the output
257-
path = self.get_data_path(
257+
path = self.get_output_path(
258258
'test_marker_attr_mapping_correctness_solver_standard_after.ma'
259259
)
260260
maya.cmds.file(rename=path)

tests/test/test_api/test_solve_allFrameStrategySolve.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def do_solve(self, solver_name, solver_type_index, scene_graph_mode):
113113
file_name = 'test_solve_allFrameStrategySolve_{}_{}_after.ma'.format(
114114
solver_name, scene_graph_name
115115
)
116-
path = self.get_data_path(file_name)
116+
path = self.get_output_path(file_name)
117117
maya.cmds.file(rename=path)
118118
maya.cmds.file(save=True, type='mayaAscii', force=True)
119119

0 commit comments

Comments
 (0)