1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0029048: Draw - avoid setting default paths to scripts and test data folders if set externally

Avoid adding default paths to test scripts when DRAW is started if relevant variables (CSF_TestStriptsPath) are already defined in the environment.
This commit is contained in:
abv 2017-08-24 15:13:43 +03:00 committed by bugmaster
parent c0f08310cc
commit 2fa4d230bb

View File

@ -59,18 +59,12 @@ if { [file isdirectory $dir] } {
puts "Warning: could not find DRAW directory"
}
# set default testing environment
if {[info exists ::env(CSF_OCCTTestsPath)] && [file isdirectory $env(CSF_OCCTTestsPath)]} {
if { ! [info exists env(CSF_TestScriptsPath)] } {
# set default testing environment (unless already defined before)
if { ! [info exists env(CSF_TestScriptsPath)] } {
if {[info exists ::env(CSF_OCCTTestsPath)] && [file isdirectory $env(CSF_OCCTTestsPath)]} {
set env(CSF_TestScriptsPath) $env(CSF_OCCTTestsPath)
} else {
set env(CSF_TestScriptsPath) $env(CSF_TestScriptsPath)[_path_separator]$env(CSF_OCCTTestsPath)
}
} elseif { [info exists env(CASROOT)] && [file isdirectory $env(CASROOT)/tests] } {
if { ! [info exists env(CSF_TestScriptsPath)] } {
} elseif { [info exists env(CASROOT)] && [file isdirectory $env(CASROOT)/tests] } {
set env(CSF_TestScriptsPath) $env(CASROOT)/tests
} else {
set env(CSF_TestScriptsPath) $env(CSF_TestScriptsPath)[_path_separator]$env(CASROOT)/tests
}
}
if {[info exists ::env(CSF_OCCTDataPath)] && [file isdirectory $env(CSF_OCCTDataPath)]} {