Skip to content

Commit e036f8f

Browse files
authored
correct server path for testing when docker runs on windows (#192)
1 parent 10c40ae commit e036f8f

11 files changed

+39
-20
lines changed

tests/test_dynabase.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def comparefile(outputf, standardf):
2626
return True
2727

2828

29-
def test_dynabase(base_initialfile, resolve_server_path, resolve_standard_path,resolve_output_path):
29+
def test_dynabase(base_initialfile, resolve_standard_path,resolve_output_path):
3030
solution = DynaSolution("localhost")
3131
fns = []
3232
fns.append(base_initialfile)
@@ -62,7 +62,8 @@ def test_dynabase(base_initialfile, resolve_server_path, resolve_standard_path,r
6262
)
6363
dbase.create_control_contact(rwpnal=1.0, ignore=1, igactc=0)
6464
outpath=solution.save_file()
65-
serveroutfile = os.path.join(outpath,"test_base.k")
65+
#serveroutfile = os.path.join(outpath,"test_base.k")
66+
serveroutfile = '/'.join((outpath,"test_base.k"))
6667
outputfile = os.path.join(resolve_output_path, "test_base.k")
6768
solution.download(serveroutfile,outputfile)
6869
standardfile = os.path.join(resolve_standard_path, "base.k")

tests/test_dynadem.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ def test_dem(dem_initialfile, resolve_server_path, resolve_standard_path,resolve
2828
solution.add(dem)
2929
dem.set_des(ndamp=0.99, tdamp=0.99, frics=0.9, fricr=0.9)
3030
outpath=solution.save_file()
31-
serveroutfile = os.path.join(outpath,"test_dem.k")
31+
#serveroutfile = os.path.join(outpath,"test_dem.k")
32+
serveroutfile = '/'.join((outpath,"test_dem.k"))
3233
outputfile = os.path.join(resolve_output_path, "test_dem.k")
3334
solution.download(serveroutfile,outputfile)
3435
standardfile = os.path.join(resolve_standard_path, "dem.k")

tests/test_dynaem.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ def test_em_railgun(resolve_em_path, resolve_server_path, resolve_standard_path,
7777
em.create_em_output(mats=2, matf=2, sols=2, solf=2)
7878
em.create_em_database_globalenergy(outlv=1)
7979
outpath=solution.save_file()
80-
serveroutfile = os.path.join(outpath,"test_railgun.k")
80+
#serveroutfile = os.path.join(outpath,"test_railgun.k")
81+
serveroutfile = '/'.join((outpath,"test_railgun.k"))
8182
outputfile = os.path.join(resolve_output_path, "test_railgun.k")
8283
solution.download(serveroutfile,outputfile)
8384
standardfile = os.path.join(resolve_standard_path,"em", "railgun.k")
@@ -130,7 +131,8 @@ def test_em_resistive_heating(resolve_em_path, resolve_server_path, resolve_stan
130131
emobj.set_init_temperature(temp=25)
131132
emobj.create_em_output(mats=2, matf=2, sols=2, solf=2)
132133
outpath=solution.save_file()
133-
serveroutfile = os.path.join(outpath,"test_resistive_heating.k")
134+
#serveroutfile = os.path.join(outpath,"test_resistive_heating.k")
135+
serveroutfile = '/'.join((outpath,"test_resistive_heating.k"))
134136
outputfile = os.path.join(resolve_output_path, "test_resistive_heating.k")
135137
solution.download(serveroutfile,outputfile)
136138
standardfile = os.path.join(resolve_standard_path,"em", "resistive_heating.k")
@@ -177,7 +179,8 @@ def test_em_resistive_heating_2d(resolve_em_path, resolve_server_path, resolve_s
177179
emobj.create_em_output(mats=2, matf=2, sols=2, solf=2)
178180

179181
outpath=solution.save_file()
180-
serveroutfile = os.path.join(outpath,"test_resistive_heating_2d.k")
182+
#serveroutfile = os.path.join(outpath,"test_resistive_heating_2d.k")
183+
serveroutfile = '/'.join((outpath,"test_resistive_heating_2d.k"))
181184
outputfile = os.path.join(resolve_output_path, "test_resistive_heating_2d.k")
182185
solution.download(serveroutfile,outputfile)
183186
standardfile = os.path.join(resolve_standard_path,"em", "resistive_heating_2d.k")
@@ -227,7 +230,8 @@ def test_em_resistive_heating_2d_isopots(resolve_em_path, resolve_server_path, r
227230
emobj.create_em_output(mats=2, matf=2, sols=2, solf=2)
228231

229232
outpath=solution.save_file()
230-
serveroutfile = os.path.join(outpath,"test_resistive_heating_2d_isopots.k")
233+
#serveroutfile = os.path.join(outpath,"test_resistive_heating_2d_isopots.k")
234+
serveroutfile = '/'.join((outpath,"test_resistive_heating_2d_isopots.k"))
231235
outputfile = os.path.join(resolve_output_path, "test_resistive_heating_2d_isopots.k")
232236
solution.download(serveroutfile,outputfile)
233237
standardfile = os.path.join(resolve_standard_path,"em", "resistive_heating_2d_isopots.k")
@@ -269,7 +273,8 @@ def test_em_rlc_isopotential(resolve_em_path, resolve_server_path, resolve_stand
269273
emobj.create_em_output(mats=2, matf=2, sols=2, solf=2)
270274

271275
outpath=solution.save_file()
272-
serveroutfile = os.path.join(outpath,"test_rlc_isopotential.k")
276+
#serveroutfile = os.path.join(outpath,"test_rlc_isopotential.k")
277+
serveroutfile = '/'.join((outpath,"test_rlc_isopotential.k"))
273278
outputfile = os.path.join(resolve_output_path, "test_rlc_isopotential.k")
274279
solution.download(serveroutfile,outputfile)
275280
standardfile = os.path.join(resolve_standard_path,"em", "rlc_isopotential.k")
@@ -323,7 +328,8 @@ def test_em_rlc_define_func(resolve_em_path, resolve_server_path, resolve_standa
323328
emobj.create_em_output(mats=2, matf=2, sols=2, solf=2)
324329

325330
outpath=solution.save_file()
326-
serveroutfile = os.path.join(outpath,"test_rlc_define_func.k")
331+
#serveroutfile = os.path.join(outpath,"test_rlc_define_func.k")
332+
serveroutfile = '/'.join((outpath,"test_rlc_define_func.k"))
327333
outputfile = os.path.join(resolve_output_path, "test_rlc_define_func.k")
328334
solution.download(serveroutfile,outputfile)
329335
standardfile = os.path.join(resolve_standard_path,"em", "rlc_define_func.k")
@@ -377,7 +383,8 @@ def test_em_resistive_heating_2d_multi_isopots(resolve_em_path, resolve_server_p
377383
emobj.create_em_output(mats=2, matf=2, sols=2, solf=2)
378384

379385
outpath=solution.save_file()
380-
serveroutfile = os.path.join(outpath,"test_resistive_heating_2d_multi_isopots.k")
386+
#serveroutfile = os.path.join(outpath,"test_resistive_heating_2d_multi_isopots.k")
387+
serveroutfile = '/'.join((outpath,"test_resistive_heating_2d_multi_isopots.k"))
381388
outputfile = os.path.join(resolve_output_path, "test_resistive_heating_2d_multi_isopots.k")
382389
solution.download(serveroutfile,outputfile)
383390
standardfile = os.path.join(resolve_standard_path,"em", "resistive_heating_2d_multi_isopots.k")

tests/test_dynaicfd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ def comparefile(outputf, standardf):
5050

5151
def check(solution,server_output_path,resolve_output_path,resolve_standard_path,filename):
5252
testfilename = "test_" + filename
53-
serveroutfile = os.path.join(server_output_path,testfilename)
53+
#serveroutfile = os.path.join(server_output_path,testfilename)
54+
serveroutfile = '/'.join((server_output_path,testfilename))
5455
outputfile = os.path.join(resolve_output_path, testfilename)
5556
solution.download(serveroutfile,outputfile)
5657
standardfile = os.path.join(resolve_standard_path, filename)

tests/test_dynaiga.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def test_iga(iga_initialfile, resolve_output_path, resolve_standard_path):
4141
cylinder3.set_motion(Curve(x=[0, 100], y=[20, 20]), dir=Direction(0, 1, 0))
4242
iga.add(cylinder3)
4343
outpath=solution.save_file()
44-
serveroutfile = os.path.join(outpath,"test_iga.k")
44+
#serveroutfile = os.path.join(outpath,"test_iga.k")
45+
serveroutfile = '/'.join((outpath,"test_iga.k"))
4546
outputfile = os.path.join(resolve_output_path, "test_iga.k")
4647
solution.download(serveroutfile,outputfile)
4748
standardfile = os.path.join(resolve_standard_path, "iga.k")

tests/test_dynaisph.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ def test_isph(isph_initialfile, resolve_output_path, resolve_standard_path):
131131
solution.set_output_database(glstat=0.001, sphmassflow=0.001)
132132
solution.create_database_binary(dt=0.01)
133133
outpath=solution.save_file()
134-
serveroutfile = os.path.join(outpath,"test_isph.k")
134+
#serveroutfile = os.path.join(outpath,"test_isph.k")
135+
serveroutfile = '/'.join((outpath,"test_isph.k"))
135136
outputfile = os.path.join(resolve_output_path, "test_isph.k")
136137
solution.download(serveroutfile,outputfile)
137138
standardfile = os.path.join(resolve_standard_path, "isph.k")

tests/test_dynamech.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def test_mech(mech_initialfile, resolve_output_path, resolve_standard_path):
6464
)
6565
solution.create_database_binary(dt=5e-4, ieverp=1)
6666
outpath=solution.save_file()
67-
serveroutfile = os.path.join(outpath,"test_mech.k")
67+
#serveroutfile = os.path.join(outpath,"test_mech.k")
68+
serveroutfile = '/'.join((outpath,"test_mech.k"))
6869
outputfile = os.path.join(resolve_output_path, "test_mech.k")
6970
solution.download(serveroutfile,outputfile)
7071
standardfile = os.path.join(resolve_standard_path, "mech.k")

tests/test_dynanvh.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def test_nvh_frf_plate_damping(resolve_nvh_path, resolve_output_path, resolve_st
7878
nvhobj.parts.add(boxshell)
7979

8080
outpath=solution.save_file()
81-
serveroutfile = os.path.join(outpath,"test_frf_plate_damping.k")
81+
#serveroutfile = os.path.join(outpath,"test_frf_plate_damping.k")
82+
serveroutfile = '/'.join((outpath,"test_frf_plate_damping.k"))
8283
outputfile = os.path.join(resolve_output_path, "test_frf_plate_damping.k")
8384
solution.download(serveroutfile,outputfile)
8485
standardfile = os.path.join(resolve_standard_path, "nvh", "frf_plate_damping.k")
@@ -145,7 +146,8 @@ def test_nvh_frf_solid(resolve_nvh_path, resolve_output_path, resolve_standard_p
145146
matsum=0.1,
146147
)
147148
outpath=solution.save_file()
148-
serveroutfile = os.path.join(outpath,"test_frf_solid.k")
149+
#serveroutfile = os.path.join(outpath,"test_frf_solid.k")
150+
serveroutfile = '/'.join((outpath,"test_frf_solid.k"))
149151
outputfile = os.path.join(resolve_output_path, "test_frf_solid.k")
150152
solution.download(serveroutfile,outputfile)
151153
standardfile = os.path.join(resolve_standard_path, "nvh", "frf_solid.k")

tests/test_dynasale.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ def test_sale(sale_initialfile, resolve_output_path, resolve_standard_path):
8080
sale.add(mesh)
8181
solution.set_output_database(matsum=0.2, glstat=0.2)
8282
outpath=solution.save_file()
83-
serveroutfile = os.path.join(outpath,"test_sale.k")
83+
#serveroutfile = os.path.join(outpath,"test_sale.k")
84+
serveroutfile = '/'.join((outpath,"test_sale.k"))
8485
outputfile = os.path.join(resolve_output_path, "test_sale.k")
8586
solution.download(serveroutfile,outputfile)
8687
standardfile = os.path.join(resolve_standard_path, "sale.k")

tests/test_dynasolution.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def test_solution(resolve_solution_path, resolve_server_path, resolve_standard_p
3434
)
3535
solution.create_database_binary(dt=5e-4, ieverp=1)
3636
outpath = solution.save_file()
37-
serveroutfile = os.path.join(outpath,"test_solution.k")
37+
#serveroutfile = os.path.join(outpath,"test_solution.k")
38+
serveroutfile = '/'.join((outpath,"test_solution.k"))
3839
outputfile = os.path.join(resolve_output_path, "test_solution.k")
3940
solution.download(serveroutfile,outputfile)
4041
standardfile = os.path.join(resolve_standard_path,"solution", "solution.k")
@@ -56,7 +57,8 @@ def test_elementary_transform(resolve_solution_path, resolve_server_path, resolv
5657
)
5758

5859
outpath=solution.save_file()
59-
serveroutfile = os.path.join(outpath,"test_elementary_main.k")
60+
#serveroutfile = os.path.join(outpath,"test_elementary_main.k")
61+
serveroutfile = '/'.join((outpath,"test_elementary_main.k"))
6062
outputfile = os.path.join(resolve_output_path, "test_elementary_main.k")
6163
solution.download(serveroutfile,outputfile)
6264
standardfile = os.path.join(resolve_standard_path,"solution", "elementary_main.k")

0 commit comments

Comments
 (0)