@@ -150,6 +150,35 @@ F_WINDOWS_ENV_WITHOUT_TEMP = {
150150
151151F_WINDOWS_ENV_WITHOUT_TEMP .update (MTR_ENV )
152152
153+
154+ WINDOWS_TESTS = {
155+ "nm" : {"create_scripts" : True },
156+ "connect" : {
157+ "suites" : ["connect" ],
158+ "mtr_env" : {
159+ ** F_WINDOWS_ENV ,
160+ "CLASSPATH" : (
161+ r"C:\connectors\mariadb-java-client-3.5.8.jar;"
162+ r"C:\connectors\mysql-connector-j-9.6.0.jar"
163+ ),
164+ },
165+ },
166+ }
167+
168+
169+ def windows_tests_steps (factory , windows_tests_dict : dict ):
170+ for typ in windows_tests_dict :
171+ addWinTests (
172+ factory = factory ,
173+ mtr_test_type = typ ,
174+ mtr_env = windows_tests_dict [typ ].get ("mtr_env" , F_WINDOWS_ENV ),
175+ mtr_additional_args = util .Property ("mtr_additional_args" , default = "" ),
176+ mtr_step_db_pool = mtrDbPool ,
177+ mtr_suites = windows_tests_dict [typ ].get ("suites" , ["default" ]),
178+ create_scripts = windows_tests_dict [typ ].get ("create_scripts" , False ),
179+ )
180+
181+
153182## f_windows
154183f_windows = util .BuildFactory ()
155184f_windows .addStep (
@@ -239,23 +268,8 @@ f_windows.addStep(
239268 )
240269)
241270
242- windows_tests = {
243- "nm" : {"create_scripts" : True },
244- "connect" : {
245- "suites" : ["connect" ],
246- },
247- }
248271
249- for typ in windows_tests :
250- addWinTests (
251- f_windows ,
252- mtr_test_type = typ ,
253- mtr_env = F_WINDOWS_ENV ,
254- mtr_additional_args = util .Property ("mtr_additional_args" , default = "" ),
255- mtr_step_db_pool = mtrDbPool ,
256- mtr_suites = windows_tests [typ ].get ("suites" , ["default" ]),
257- create_scripts = windows_tests [typ ].get ("create_scripts" , False ),
258- )
272+ windows_tests_steps (f_windows , WINDOWS_TESTS )
259273
260274
261275def windows_save_logs_step ():
@@ -444,12 +458,6 @@ f_windows_msi.addStep(
444458 warningPattern = vsWarningPattern ,
445459 )
446460)
447- windows_msi_tests = {
448- "nm" : {"create_scripts" : True },
449- "connect" : {
450- "suites" : ["connect" ],
451- },
452- }
453461
454462f_windows_msi .addStep (
455463 steps .ShellCommand (
@@ -481,17 +489,7 @@ for script in MSI_SCRIPTS:
481489 )
482490 )
483491
484-
485- for typ in windows_msi_tests :
486- addWinTests (
487- f_windows_msi ,
488- mtr_test_type = typ ,
489- mtr_env = F_WINDOWS_ENV ,
490- mtr_additional_args = util .Property ("mtr_additional_args" , default = "" ),
491- mtr_step_db_pool = mtrDbPool ,
492- mtr_suites = windows_msi_tests [typ ].get ("suites" , ["default" ]),
493- create_scripts = windows_msi_tests [typ ].get ("create_scripts" , False ),
494- )
492+ windows_tests_steps (f_windows_msi , WINDOWS_TESTS )
495493
496494f_windows_msi .addStep (
497495 steps .ShellCommand (
0 commit comments