Skip to content

Commit c1e1464

Browse files
fredroyepernod
andauthored
Add more regression tests (#180)
* fix warnings, behavior in scenes * remove nbBeams deprecation msg and nb nodes/edges warnings * fix regression tests * remove info msg about topology * add more regression tests, and update some other * add pythonpath for running python scenes * fix nb nodes warnings and regenerate refs --------- Co-authored-by: erik pernod <erik.pernod@gmail.com>
1 parent 029a09b commit c1e1464

29 files changed

Lines changed: 20 additions & 6 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ jobs:
139139
# Setup mandatory env vars
140140
export REGRESSION_SCENES_DIR="${WORKSPACE_SRC_PATH}/examples"
141141
export REGRESSION_REFERENCES_DIR="${WORKSPACE_SRC_PATH}/regression/references"
142+
export PYTHONPATH=$SOFA_ROOT/plugins/SofaPython3/lib/python3/site-packages
142143
# Run regression test bench
143144
${SOFA_ROOT}/bin/Regression_test${{ steps.sofa.outputs.exe }}
144145
else

examples/3instruments_collis.scn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<EulerImplicitSolver rayleighStiffness="0.2" rayleighMass="0.1" printLog="false" />
7777
<BTDLinearSolver subpartSolve="0" verification="0" verbose="0"/>
7878
<RegularGridTopology name="meshLinesCombined"
79-
nx="180" ny="1" nz="1"
79+
nx="181" ny="1" nz="1"
8080
xmin="0.0" xmax="1.0"
8181
ymin="0" ymax="0"
8282
zmin="1" zmax="1"

examples/RegressionStateScenes.regression-tests

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
### Demo scenes ###
99
SingleBeam.scn 1000 1e-4 1 1
10-
SingleBeamDeployment.scn 1000 1e-4 1 1
11-
SingleBeamDeploymentCollision.scn 1000 1e-4 1 1
12-
3instruments_collis.scn 2000 1e-4 1 1
10+
SingleBeamDeployment.scn 10000 1e-4 1 1
11+
SingleBeamDeploymentCollision.scn 7000 1e-4 1 1
12+
3instruments.scn 2000 1e-4 1 1
13+
3instruments_collis.scn 3000 1e-4 1 1
14+
Tool_from_loader.scn 1000 1e-4 1 1

examples/SingleBeamDeployment.scn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<Node name="BeamModel">
2929
<EulerImplicitSolver rayleighStiffness="0.2" rayleighMass="0.1" printLog="false" />
3030
<BTDLinearSolver verbose="0"/>
31-
<RegularGridTopology name="MeshLines" nx="60" ny="1" nz="1"
31+
<RegularGridTopology name="MeshLines" nx="36" ny="1" nz="1"
3232
xmax="0.0" xmin="0.0" ymin="0" ymax="0" zmax="0" zmin="0"
3333
p0="0 0 0" drawEdges="1"/>
3434
<MechanicalObject template="Rigid3d" name="DOFs Container" ry="-90" />

examples/SingleBeamDeploymentCollision.scn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
<Node name="BeamModel">
4747
<EulerImplicitSolver rayleighStiffness="0.2" rayleighMass="0.1" printLog="false" />
4848
<BTDLinearSolver verbose="0"/>
49-
<RegularGridTopology name="MeshLines" nx="60" ny="1" nz="1"
49+
<RegularGridTopology name="MeshLines" nx="61" ny="1" nz="1"
5050
xmax="0.0" xmin="0.0" ymin="0" ymax="0" zmax="0" zmin="0"
5151
p0="0 0 0" drawEdges="1"/>
5252
<MechanicalObject template="Rigid3d" name="DOFs Container" ry="-90" />
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# WARNING:
2+
# REGRESSION_TEST DOES NOT SUPPORT DASHES ("-") IN SCENE NAMES.
3+
# USE UNDERSCORES ("_") INSTEAD.
4+
5+
### References relative path ###
6+
../../regression/references
7+
8+
### Demo scenes ###
9+
SingleBeam.py 1000 1e-4 1 1
10+
SingleBeamDeployment.py 10000 1e-4 1 1
11+
SingleBeamDeploymentCollision.py 7000 1e-4 1 1

regression/references/3instruments.scn.reference

Whitespace-only changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)