File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed
Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 11import os
22import sys
3+ from pathlib import Path
34
45#example of use:
56# on linux
1112# 0 - script name
1213# 1 - regression_test binary path
1314# 2 - regression scenes dir
14- # 3 - regression references dir
15- # 4 - sofa build dir
15+ # 3 - sofa build dir
16+ # 4 (optional) - Refrence plugin directory. If not set, will take the parent dir of this file.
17+
1618
1719os .environ ["REGRESSION_SCENES_DIR" ] = sys .argv [2 ]
18- os .environ ["REGRESSION_REFERENCES_DIR" ] = sys .argv [3 ]
1920
20- os .environ ["SOFA_ROOT" ] = sys .argv [4 ]
21- os .environ ["SOFA_PLUGIN_PATH" ] = sys .argv [4 ] + '/lib'
21+ os .environ ["SOFA_ROOT" ] = sys .argv [3 ]
22+ os .environ ["SOFA_PLUGIN_PATH" ] = sys .argv [3 ] + '/lib'
23+
24+
25+ if len (sys .argv ) == 5 :
26+ os .environ ["REGRESSION_DIR" ] = sys .argv [4 ]
27+ else :
28+ script_dir = Path ( __file__ ).parent .absolute ()
29+ os .environ ["REGRESSION_DIR" ] = script_dir
30+
31+
2232
2333os .system (sys .argv [1 ])
You can’t perform that action at this time.
0 commit comments