From 2fa4d230bba47beca9c1a1519630cc75cc2e4d4e Mon Sep 17 00:00:00 2001 From: abv Date: Thu, 24 Aug 2017 15:13:43 +0300 Subject: [PATCH] 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. --- src/DrawResources/DrawDefault | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/DrawResources/DrawDefault b/src/DrawResources/DrawDefault index b0c117cc94..71b121a547 100755 --- a/src/DrawResources/DrawDefault +++ b/src/DrawResources/DrawDefault @@ -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)]} {