mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0027146: Create command checkplatform
Command checkplatform was created. All test cases were updated. Global variable os_type was eliminated. New option -osx (MacOS) for procedure checkplatform was added.
This commit is contained in:
parent
0a2a7b466d
commit
863f782a42
@ -601,12 +601,12 @@ puts "TODO BugNumber ListOfPlatforms: RegularExpression"
|
|||||||
|
|
||||||
Here:
|
Here:
|
||||||
* *BugNumber* is the bug ID in the tracker. For example: #12345.
|
* *BugNumber* is the bug ID in the tracker. For example: #12345.
|
||||||
* *ListOfPlatforms* is a list of platforms, at which the bug is reproduced (Linux, Windows, MacOS, or All). Note that the platform name is custom for the OCCT test system; it corresponds to the value of environment variable *os_type* defined in DRAW.
|
* *ListOfPlatforms* is a list of platforms, at which the bug is reproduced (Linux, Windows, MacOS, or All). Note that the platform name is custom for the OCCT test system; Use procedure *checkplatform* to get the platform name.
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
~~~~~
|
~~~~~
|
||||||
Draw[2]> puts $env(os_type)
|
Draw[2]> checkplatform
|
||||||
windows
|
Windows
|
||||||
~~~~~
|
~~~~~
|
||||||
|
|
||||||
* RegularExpression is a regular expression, which should be matched against the line indicating the problem in the script output.
|
* RegularExpression is a regular expression, which should be matched against the line indicating the problem in the script output.
|
||||||
|
@ -1022,3 +1022,63 @@ proc checktrinfo {shape args} {
|
|||||||
puts "Error: Maximal deflection is too big"
|
puts "Error: Maximal deflection is too big"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
help checkplatform {
|
||||||
|
Return name of current platform if no options are given.
|
||||||
|
|
||||||
|
Use: checkplatform [options...]
|
||||||
|
Allowed options are:
|
||||||
|
-windows : return 1 if current platform is 'Windows', overwise return 0
|
||||||
|
-linux : return 1 if current platform is 'Linux', overwise return 0
|
||||||
|
-osx : return 1 if current platform is 'MacOS X', overwise return 0
|
||||||
|
|
||||||
|
Only one option can be used at once.
|
||||||
|
If no option is given, procedure will return the name of current platform.
|
||||||
|
}
|
||||||
|
proc checkplatform {args} {
|
||||||
|
set check_for_windows false
|
||||||
|
set check_for_linux false
|
||||||
|
set check_for_macosx false
|
||||||
|
|
||||||
|
set options {{"-windows" check_for_windows 0}
|
||||||
|
{"-linux" check_for_linux 0}
|
||||||
|
{"-osx" check_for_macosx 0}}
|
||||||
|
|
||||||
|
_check_args ${args} ${options} "checkplatform"
|
||||||
|
|
||||||
|
if { [regexp "indows" $::tcl_platform(os)] } {
|
||||||
|
set current_platform Windows
|
||||||
|
} elseif { $::tcl_platform(os) == "Linux" } {
|
||||||
|
set current_platform Linux
|
||||||
|
} elseif { $::tcl_platform(os) == "Darwin" } {
|
||||||
|
set current_platform MacOS
|
||||||
|
}
|
||||||
|
|
||||||
|
# no args are given
|
||||||
|
if { !${check_for_windows} && !${check_for_linux} && !${check_for_macosx}} {
|
||||||
|
return ${current_platform}
|
||||||
|
}
|
||||||
|
|
||||||
|
# check usage of proc checkplatform
|
||||||
|
if { [expr [string is true ${check_for_windows}] + [string is true ${check_for_linux}] + [string is true ${check_for_macosx}] ] > 1} {
|
||||||
|
error "Error: wrong usage of command checkplatform, only single option can be used at once"
|
||||||
|
}
|
||||||
|
|
||||||
|
# checking for Windows platform
|
||||||
|
if { ${check_for_windows} && ${current_platform} == "Windows" } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# checking for Mac OS X platforms
|
||||||
|
if { ${check_for_linux} && ${current_platform} == "Linux" } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# checking for Mac OS X platforms
|
||||||
|
if { ${check_for_macosx} && ${current_platform} == "MacOS" } {
|
||||||
|
return 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# current platform is not equal to given as argument platform, return false
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
@ -1182,7 +1182,7 @@ proc _check_log {dir group gridname casename errors log {_summary {}} {_html_log
|
|||||||
# check if line defines specific treatment of some messages
|
# check if line defines specific treatment of some messages
|
||||||
if [regexp -nocase {^[ \s]*TODO ([^:]*):(.*)$} $line res platforms pattern] {
|
if [regexp -nocase {^[ \s]*TODO ([^:]*):(.*)$} $line res platforms pattern] {
|
||||||
if { ! [regexp -nocase {\mAll\M} $platforms] &&
|
if { ! [regexp -nocase {\mAll\M} $platforms] &&
|
||||||
! [regexp -nocase "\\m$env(os_type)\\M" $platforms] } {
|
! [regexp -nocase "\\m[checkplatform]\\M" $platforms] } {
|
||||||
lappend html_log [_html_highlight IGNORE $line]
|
lappend html_log [_html_highlight IGNORE $line]
|
||||||
continue ;# TODO statement is for another platform
|
continue ;# TODO statement is for another platform
|
||||||
}
|
}
|
||||||
@ -1206,7 +1206,7 @@ proc _check_log {dir group gridname casename errors log {_summary {}} {_html_log
|
|||||||
}
|
}
|
||||||
if [regexp -nocase {^[ \s]*REQUIRED ([^:]*):[ \s]*(.*)$} $line res platforms pattern] {
|
if [regexp -nocase {^[ \s]*REQUIRED ([^:]*):[ \s]*(.*)$} $line res platforms pattern] {
|
||||||
if { ! [regexp -nocase {\mAll\M} $platforms] &&
|
if { ! [regexp -nocase {\mAll\M} $platforms] &&
|
||||||
! [regexp -nocase "\\m$env(os_type)\\M" $platforms] } {
|
! [regexp -nocase "\\m[checkplatform]\\M" $platforms] } {
|
||||||
lappend html_log [_html_highlight IGNORE $line]
|
lappend html_log [_html_highlight IGNORE $line]
|
||||||
continue ;# REQUIRED statement is for another platform
|
continue ;# REQUIRED statement is for another platform
|
||||||
}
|
}
|
||||||
@ -1742,21 +1742,6 @@ proc _log_xml_summary {logdir filename log include_cout} {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
# define custom platform name
|
|
||||||
proc _tests_platform_def {} {
|
|
||||||
global env tcl_platform
|
|
||||||
|
|
||||||
if [info exists env(os_type)] { return }
|
|
||||||
set env(os_type) $tcl_platform(platform)
|
|
||||||
if { $tcl_platform(os) == "Linux" } {
|
|
||||||
set env(os_type) Linux
|
|
||||||
}
|
|
||||||
if { $tcl_platform(os) == "Darwin" } {
|
|
||||||
set env(os_type) MacOS
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_tests_platform_def
|
|
||||||
|
|
||||||
# Auxiliary procedure to split path specification (usually defined by
|
# Auxiliary procedure to split path specification (usually defined by
|
||||||
# environment variable) into list of directories or files
|
# environment variable) into list of directories or files
|
||||||
proc _split_path {pathspec} {
|
proc _split_path {pathspec} {
|
||||||
|
7
tests/3rdparty/export/A1
vendored
7
tests/3rdparty/export/A1
vendored
@ -18,9 +18,8 @@ set aFile $imagedir/shape.pdf
|
|||||||
|
|
||||||
set format PDF
|
set format PDF
|
||||||
|
|
||||||
|
if { [checkplatform -windows] } {
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
|
||||||
set size 144401
|
|
||||||
} else {
|
|
||||||
set size 154489
|
set size 154489
|
||||||
|
} else {
|
||||||
|
set size 144401
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,7 @@ if [catch {SaveAs D ${FileName} }] {
|
|||||||
puts "There is not ${FileName2} file"
|
puts "There is not ${FileName2} file"
|
||||||
#
|
#
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
puts "OS = Windows NT"
|
puts "OS = Windows NT"
|
||||||
set status 1
|
set status 1
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ if [catch {SaveAs D ${FileName} }] {
|
|||||||
} else {
|
} else {
|
||||||
puts "There is not ${FileName3} file"
|
puts "There is not ${FileName3} file"
|
||||||
#
|
#
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
puts "OS = Windows NT"
|
puts "OS = Windows NT"
|
||||||
} else {
|
} else {
|
||||||
puts "OS = Unix"
|
puts "OS = Unix"
|
||||||
|
@ -10,10 +10,7 @@ pload DCAF
|
|||||||
|
|
||||||
set BugNumber OCC23852
|
set BugNumber OCC23852
|
||||||
|
|
||||||
set OS_platform $tcl_platform(platform)
|
if { [checkplatform -windows] } {
|
||||||
puts "OS = ${OS_platform}"
|
|
||||||
|
|
||||||
if { [string compare ${OS_platform} "windows"] == 0 } {
|
|
||||||
|
|
||||||
# Windows, #1
|
# Windows, #1
|
||||||
set OSD_Path "\\\\Server\\Shared\\Folder\\File.Extension"
|
set OSD_Path "\\\\Server\\Shared\\Folder\\File.Extension"
|
||||||
@ -51,9 +48,7 @@ if { [string compare ${OS_platform} "windows"] == 0 } {
|
|||||||
puts "${BugNumber}, Extension, #2: Error"
|
puts "${BugNumber}, Extension, #2: Error"
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if { [string compare ${OS_platform} "unix"] == 0 } {
|
|
||||||
# Linux
|
# Linux
|
||||||
set OSD_Path "//Server/Shared/Folder/File.Extension"
|
set OSD_Path "//Server/Shared/Folder/File.Extension"
|
||||||
puts "OSD_Path = ${OSD_Path}"
|
puts "OSD_Path = ${OSD_Path}"
|
||||||
|
@ -19,14 +19,14 @@ if { ${ll} != 2 } {
|
|||||||
set result2 [lindex ${result} 1]
|
set result2 [lindex ${result} 1]
|
||||||
set CurrentDirectory [pwd]
|
set CurrentDirectory [pwd]
|
||||||
set UpTrek "[file join [file dirname [file dirname ${CurrentDirectory}]] [file tail ${CurrentDirectory}]]"
|
set UpTrek "[file join [file dirname [file dirname ${CurrentDirectory}]] [file tail ${CurrentDirectory}]]"
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0} {
|
if { [checkplatform -windows] } {
|
||||||
set res1 [ string range $result1 1 [expr [string length $result1] -3 ] ]
|
|
||||||
set res2 [ string range $result2 1 [expr [string length $result2] -3 ] ]
|
|
||||||
} else {
|
|
||||||
set res1 [ string range $result1 3 [expr [string length $result1] -2 ] ]
|
set res1 [ string range $result1 3 [expr [string length $result1] -2 ] ]
|
||||||
set res2 [ string range $result2 3 [expr [string length $result2] -2 ] ]
|
set res2 [ string range $result2 3 [expr [string length $result2] -2 ] ]
|
||||||
set CurrentDirectory [ string range $CurrentDirectory 2 [expr [string length $CurrentDirectory] -1 ]]
|
set CurrentDirectory [ string range $CurrentDirectory 2 [expr [string length $CurrentDirectory] -1 ]]
|
||||||
set UpTrek [ string range $UpTrek 2 [expr [string length $UpTrek] -1 ]]
|
set UpTrek [ string range $UpTrek 2 [expr [string length $UpTrek] -1 ]]
|
||||||
|
} else {
|
||||||
|
set res1 [ string range $result1 1 [expr [string length $result1] -3 ] ]
|
||||||
|
set res2 [ string range $result2 1 [expr [string length $result2] -3 ] ]
|
||||||
}
|
}
|
||||||
if {[string compare ${res1} "${CurrentDirectory}"] == 0} {
|
if {[string compare ${res1} "${CurrentDirectory}"] == 0} {
|
||||||
puts "OCC309: OK 1"
|
puts "OCC309: OK 1"
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
set env(os_type) $tcl_platform(platform)
|
if { ![checkplatform -windows] } {
|
||||||
if {[string compare $env(os_type) "windows"] != 0 } {
|
|
||||||
puts "TODO ?OCC12345 MacOS: \\*\\* Exception"
|
puts "TODO ?OCC12345 MacOS: \\*\\* Exception"
|
||||||
puts "TODO ?OCC12345 MacOS: An exception was caught"
|
puts "TODO ?OCC12345 MacOS: An exception was caught"
|
||||||
puts "TODO ?OCC12345 MacOS: TEST INCOMPLETE"
|
puts "TODO ?OCC12345 MacOS: TEST INCOMPLETE"
|
||||||
|
@ -20,7 +20,7 @@ set q2 [dchrono h show]
|
|||||||
|
|
||||||
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z
|
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full z
|
||||||
puts "$z"
|
puts "$z"
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
puts "OS = Windows NT"
|
puts "OS = Windows NT"
|
||||||
set max_time 0.5
|
set max_time 0.5
|
||||||
} else {
|
} else {
|
||||||
|
@ -30,7 +30,7 @@ set q2 [dchrono h2 show]
|
|||||||
#
|
#
|
||||||
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q1 full t1
|
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q1 full t1
|
||||||
puts "$t1"
|
puts "$t1"
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
puts "OS = Windows NT"
|
puts "OS = Windows NT"
|
||||||
set max_time1 20
|
set max_time1 20
|
||||||
} else {
|
} else {
|
||||||
@ -46,7 +46,7 @@ if { $t1 > ${max_time1} } {
|
|||||||
#
|
#
|
||||||
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full t2
|
regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full t2
|
||||||
puts "$t2"
|
puts "$t2"
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
puts "OS = Windows NT"
|
puts "OS = Windows NT"
|
||||||
set max_time2 20
|
set max_time2 20
|
||||||
} else {
|
} else {
|
||||||
|
@ -20,8 +20,7 @@ set chrono_info [dchrono perf_h show]
|
|||||||
regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
|
regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
|
||||||
puts "Elapsed time is: $CPU_time"
|
puts "Elapsed time is: $CPU_time"
|
||||||
|
|
||||||
set currentOS $tcl_platform(os)
|
if { [checkplatform -windows] } {
|
||||||
if {[string compare $currentOS "Windows NT"] == 0} {
|
|
||||||
if {[regexp {Debug mode} [dversion]]} {
|
if {[regexp {Debug mode} [dversion]]} {
|
||||||
# initial CPU_time for WINDOWS in DEBUG mode is 90 sec
|
# initial CPU_time for WINDOWS in DEBUG mode is 90 sec
|
||||||
puts "Checking WINDOWS performance in debug mode..."
|
puts "Checking WINDOWS performance in debug mode..."
|
||||||
@ -41,8 +40,7 @@ if {[string compare $currentOS "Windows NT"] == 0} {
|
|||||||
puts "Done!"
|
puts "Done!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
if {[string compare $currentOS "Linux"] == 0} {
|
|
||||||
if {[regexp {Debug mode} [dversion]]} {
|
if {[regexp {Debug mode} [dversion]]} {
|
||||||
# initial CPU_time for LINUX in DEBUG mode is 90 sec
|
# initial CPU_time for LINUX in DEBUG mode is 90 sec
|
||||||
puts "Checking LINUX performance in debug mode..."
|
puts "Checking LINUX performance in debug mode..."
|
||||||
|
@ -19,7 +19,7 @@ for {set i 1} {$i <= 1000} {incr i} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dchrono cr stop
|
dchrono cr stop
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set max_time 7.5
|
set max_time 7.5
|
||||||
} else {
|
} else {
|
||||||
set max_time 4.5
|
set max_time 4.5
|
||||||
|
@ -18,7 +18,7 @@ tclean result
|
|||||||
set Deflection 1.
|
set Deflection 1.
|
||||||
catch {incmesh result ${Deflection} }
|
catch {incmesh result ${Deflection} }
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set good_tri 96265
|
set good_tri 96265
|
||||||
set good_nod 71339
|
set good_nod 71339
|
||||||
set good_defl 27.956052399907215
|
set good_defl 27.956052399907215
|
||||||
|
@ -33,7 +33,7 @@ puts "CPU_user_time=${CPU_user_time}"
|
|||||||
checkprops result -s 1.40193e+07
|
checkprops result -s 1.40193e+07
|
||||||
checknbshapes result -vertex 372 -edge 369 -wire 2 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 745
|
checknbshapes result -vertex 372 -edge 369 -wire 2 -face 1 -shell 0 -solid 0 -compsolid 0 -compound 1 -shape 745
|
||||||
|
|
||||||
if {[string compare $tcl_platform(platform) "windows"] == 0} {
|
if { [checkplatform -windows] } {
|
||||||
puts "windows"
|
puts "windows"
|
||||||
set Good_CPU_user_time 0.
|
set Good_CPU_user_time 0.
|
||||||
} else {
|
} else {
|
||||||
|
@ -12,7 +12,7 @@ puts ""
|
|||||||
restore [locate_data_file OCC567a.draw] s1
|
restore [locate_data_file OCC567a.draw] s1
|
||||||
restore [locate_data_file OCC567b.draw] s2
|
restore [locate_data_file OCC567b.draw] s2
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
puts "OS = Windows NT"
|
puts "OS = Windows NT"
|
||||||
set N_repeat 10
|
set N_repeat 10
|
||||||
} else {
|
} else {
|
||||||
|
@ -19,11 +19,8 @@ set chrono_info [dchrono perf_h show]
|
|||||||
regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
|
regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
|
||||||
puts "Elapsed time is: $CPU_time"
|
puts "Elapsed time is: $CPU_time"
|
||||||
|
|
||||||
# Check current OS
|
|
||||||
set currentOS $tcl_platform(os)
|
|
||||||
|
|
||||||
# Check prformance on Windows
|
# Check prformance on Windows
|
||||||
if {[string compare $currentOS "Windows NT"] == 0} {
|
if { [checkplatform -windows] } {
|
||||||
if {[regexp {Debug mode} [dversion]]} {
|
if {[regexp {Debug mode} [dversion]]} {
|
||||||
# DEBUG mode
|
# DEBUG mode
|
||||||
# initial CPU_time for WINDOWS in DEBUG mode is 410 ((186+19)*2) sec
|
# initial CPU_time for WINDOWS in DEBUG mode is 410 ((186+19)*2) sec
|
||||||
@ -45,10 +42,7 @@ if {[string compare $currentOS "Windows NT"] == 0} {
|
|||||||
puts "Done!"
|
puts "Done!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
|
||||||
# Check performance on Linux
|
|
||||||
if {[string compare $currentOS "Linux"] == 0} {
|
|
||||||
if {[regexp {Debug mode} [dversion]]} {
|
if {[regexp {Debug mode} [dversion]]} {
|
||||||
# DEBUG mode
|
# DEBUG mode
|
||||||
# initial CPU_time for LINUX in DEBUG mode is 900 sec
|
# initial CPU_time for LINUX in DEBUG mode is 900 sec
|
||||||
|
@ -21,11 +21,8 @@ set chrono_info [dchrono perf_h show]
|
|||||||
regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
|
regexp {CPU user time: ([-0-9.+eE]+) seconds} $chrono_info full CPU_time
|
||||||
puts "Elapsed time is: $CPU_time"
|
puts "Elapsed time is: $CPU_time"
|
||||||
|
|
||||||
# Check current OS
|
|
||||||
set currentOS $tcl_platform(os)
|
|
||||||
|
|
||||||
# Check prformance on Windows
|
# Check prformance on Windows
|
||||||
if {[string compare $currentOS "Windows NT"] == 0} {
|
if { [checkplatform -windows] } {
|
||||||
if {[regexp {Debug mode} [dversion]]} {
|
if {[regexp {Debug mode} [dversion]]} {
|
||||||
# DEBUG mode
|
# DEBUG mode
|
||||||
# initial CPU_time for WINDOWS in DEBUG mode is 1208 ((549+55)*2) sec
|
# initial CPU_time for WINDOWS in DEBUG mode is 1208 ((549+55)*2) sec
|
||||||
@ -47,10 +44,7 @@ if {[string compare $currentOS "Windows NT"] == 0} {
|
|||||||
puts "Done!"
|
puts "Done!"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
} else {
|
||||||
|
|
||||||
# Check performance on Linux
|
|
||||||
if {[string compare $currentOS "Linux"] == 0} {
|
|
||||||
if {[regexp {Debug mode} [dversion]]} {
|
if {[regexp {Debug mode} [dversion]]} {
|
||||||
# DEBUG mode
|
# DEBUG mode
|
||||||
# initial CPU_time for LINUX in DEBUG mode is 1500 sec
|
# initial CPU_time for LINUX in DEBUG mode is 1500 sec
|
||||||
|
@ -22,10 +22,10 @@ set aFile ${imagedir}/${test_image}.pdf
|
|||||||
|
|
||||||
vexport ${aFile} PDF
|
vexport ${aFile} PDF
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set refsize 144401
|
|
||||||
} else {
|
|
||||||
set refsize 153993
|
set refsize 153993
|
||||||
|
} else {
|
||||||
|
set refsize 144401
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
|
@ -47,10 +47,10 @@ set aFile ${imagedir}/${test_image}.pdf
|
|||||||
|
|
||||||
vexport ${aFile} PDF
|
vexport ${aFile} PDF
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set refsize 10107
|
|
||||||
} else {
|
|
||||||
set refsize 10131
|
set refsize 10131
|
||||||
|
} else {
|
||||||
|
set refsize 10107
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
|
@ -47,10 +47,10 @@ set aFile ${imagedir}/${test_image}.ps
|
|||||||
|
|
||||||
vexport ${aFile} PS
|
vexport ${aFile} PS
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set refsize 10386
|
|
||||||
} else {
|
|
||||||
set refsize 10410
|
set refsize 10410
|
||||||
|
} else {
|
||||||
|
set refsize 10386
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
|
@ -46,10 +46,10 @@ set aFile ${imagedir}/${test_image}.eps
|
|||||||
|
|
||||||
vexport ${aFile} EPS
|
vexport ${aFile} EPS
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set refsize 10330
|
|
||||||
} else {
|
|
||||||
set refsize 10354
|
set refsize 10354
|
||||||
|
} else {
|
||||||
|
set refsize 10330
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
|
@ -47,10 +47,10 @@ set aFile ${imagedir}/${test_image}.svg
|
|||||||
|
|
||||||
vexport ${aFile} SVG
|
vexport ${aFile} SVG
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set refsize 14207
|
|
||||||
} else {
|
|
||||||
set refsize 14091
|
set refsize 14091
|
||||||
|
} else {
|
||||||
|
set refsize 14207
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
|
@ -47,10 +47,10 @@ set aFile ${imagedir}/${test_image}.pgf
|
|||||||
|
|
||||||
vexport ${aFile} PGF
|
vexport ${aFile} PGF
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set refsize 20438
|
|
||||||
} else {
|
|
||||||
set refsize 20810
|
set refsize 20810
|
||||||
|
} else {
|
||||||
|
set refsize 20438
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [file exists ${aFile}] } {
|
if { [file exists ${aFile}] } {
|
||||||
|
@ -20,10 +20,10 @@ vdisplay result
|
|||||||
vsetdispmode 1
|
vsetdispmode 1
|
||||||
vfit
|
vfit
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] == 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set good_tri 6114
|
set good_tri 6114
|
||||||
set good_nod 3080
|
set good_nod 3080
|
||||||
set good_defl 0.50050406431775729
|
set good_defl 0.50050406431775729
|
||||||
} else {
|
} else {
|
||||||
set good_tri 6148
|
set good_tri 6148
|
||||||
set good_nod 3097
|
set good_nod 3097
|
||||||
|
@ -61,8 +61,7 @@ set result23 [regexp "$Yellow" [vreadpixel $x4 $y4 rgb]]
|
|||||||
set result24 [regexp "$Yellow" [vreadpixel $x5 $y5 rgb]]
|
set result24 [regexp "$Yellow" [vreadpixel $x5 $y5 rgb]]
|
||||||
set result25 [regexp "$Yellow" [vreadpixel $x6 $y6 rgb]]
|
set result25 [regexp "$Yellow" [vreadpixel $x6 $y6 rgb]]
|
||||||
|
|
||||||
set env(os_type) $tcl_platform(platform)
|
if { ![checkplatform -windows] } {
|
||||||
if { [string compare $env(os_type) "windows"] != 0 } {
|
|
||||||
set result31 [regexp "$Cyan" [vreadpixel $x2 $y2 rgb]]
|
set result31 [regexp "$Cyan" [vreadpixel $x2 $y2 rgb]]
|
||||||
if { $result31 == 0 } {
|
if { $result31 == 0 } {
|
||||||
set IsFaulty 1
|
set IsFaulty 1
|
||||||
|
@ -12,15 +12,12 @@ vclear
|
|||||||
vaxo
|
vaxo
|
||||||
vzbufftrihedron
|
vzbufftrihedron
|
||||||
|
|
||||||
if { [array get env os_type] != "" } {
|
if { [checkplatform -windows] } {
|
||||||
set os $env(os_type)
|
|
||||||
}
|
|
||||||
if { [string compare $os "windows"] != 0 } {
|
|
||||||
# Linux platform
|
|
||||||
set ok_color "GRAY85"
|
|
||||||
} else {
|
|
||||||
# Windows platform
|
# Windows platform
|
||||||
set ok_color "GRAY52"
|
set ok_color "GRAY52"
|
||||||
|
} else {
|
||||||
|
# Linux platform
|
||||||
|
set ok_color "GRAY85"
|
||||||
}
|
}
|
||||||
|
|
||||||
set bug_info [vreadpixel 71 350 rgb name]
|
set bug_info [vreadpixel 71 350 rgb name]
|
||||||
|
@ -4,8 +4,7 @@ puts "TODO OCC24156 MacOS: Error: unsupported locale specification"
|
|||||||
# Just run multiple conversions of the shape to and from diferent formats and
|
# Just run multiple conversions of the shape to and from diferent formats and
|
||||||
# check that the result is good shape with expected area
|
# check that the result is good shape with expected area
|
||||||
|
|
||||||
set anOS $tcl_platform(os)
|
if { [checkplatform -linux] } {
|
||||||
if { ${anOS} == "Linux" } {
|
|
||||||
dlocale LC_ALL fr_FR
|
dlocale LC_ALL fr_FR
|
||||||
} else {
|
} else {
|
||||||
dlocale LC_ALL French
|
dlocale LC_ALL French
|
||||||
|
@ -7,10 +7,9 @@ dset SCALE 100
|
|||||||
if { [string compare $command chamf_sequence] == 0 } {
|
if { [string compare $command chamf_sequence] == 0 } {
|
||||||
puts "TODO #22909 ALL: Error: The tests should be reviewed"
|
puts "TODO #22909 ALL: Error: The tests should be reviewed"
|
||||||
puts "Error: The tests should be reviewed."
|
puts "Error: The tests should be reviewed."
|
||||||
set env(os_type) $tcl_platform(platform)
|
|
||||||
|
|
||||||
set nf 0
|
set nf 0
|
||||||
if { [string compare ${env(os_type)} "windows"] != 0 } {
|
if { ![checkplatform -windows] } {
|
||||||
if { [string compare $group dist_dist] == 0 } {
|
if { [string compare $group dist_dist] == 0 } {
|
||||||
set nf 2
|
set nf 2
|
||||||
} elseif { [string compare $group equal_dist] == 0 } {
|
} elseif { [string compare $group equal_dist] == 0 } {
|
||||||
@ -18,13 +17,13 @@ if { [string compare $command chamf_sequence] == 0 } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [string compare ${env(os_type)} "windows"] == 0} {
|
if { [checkplatform -windows] } {
|
||||||
if {[string compare $group dist_dist] == 0 || [string compare $group equal_dist] == 0 } {
|
if {[string compare $group dist_dist] == 0 || [string compare $group equal_dist] == 0 } {
|
||||||
set nf 2
|
set nf 2
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [string compare ${env(os_type)} "MacOS"] == 0 } {
|
if { [checkplatform -osx] } {
|
||||||
if { [string compare $group dist_dist] == 0 } {
|
if { [string compare $group dist_dist] == 0 } {
|
||||||
puts "TODO OCC24156 MacOS: chamfer is not done. compute of chamfer failed"
|
puts "TODO OCC24156 MacOS: chamfer is not done. compute of chamfer failed"
|
||||||
set nf 8
|
set nf 8
|
||||||
@ -39,7 +38,7 @@ if { [string compare $command chamf_sequence] == 0 } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if { $nf != 0 } {
|
if { $nf != 0 } {
|
||||||
#puts "TODO OCC22909 $env(os_type):Faulty shapes in variables faulty_1 to faulty_$nf"
|
#puts "TODO OCC22909 [checkplatform]:Faulty shapes in variables faulty_1 to faulty_$nf"
|
||||||
puts "TODO OCC22909 ALL:Faulty shapes in variables faulty_1 to faulty_"
|
puts "TODO OCC22909 ALL:Faulty shapes in variables faulty_1 to faulty_"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
# test for command getsource
|
# test for command getsource
|
||||||
|
|
||||||
# check that path returned for command pload is as expected
|
# check that path returned for command pload is as expected
|
||||||
set env(os_type) $tcl_platform(platform)
|
if { [checkplatform -windows] } {
|
||||||
if { [string compare $env(os_type) "windows"] == 0 } {
|
|
||||||
set expected src/Draw/Draw_PloadCommands.cxx
|
set expected src/Draw/Draw_PloadCommands.cxx
|
||||||
} else {
|
} else {
|
||||||
set expected /src/Draw/Draw_PloadCommands.cxx
|
set expected /src/Draw/Draw_PloadCommands.cxx
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
set TheFileName shading_055.brep
|
set TheFileName shading_055.brep
|
||||||
set env(os_type) $tcl_platform(os)
|
|
||||||
if { [string compare $command "shading"] == 0 } {
|
if { [string compare $command "shading"] == 0 } {
|
||||||
set nb 62
|
set nb 62
|
||||||
}
|
}
|
||||||
@ -11,4 +10,4 @@ if { [string compare $command "mesh"] == 0 } {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set bug_cross "OCC22687"
|
set bug_cross "OCC22687"
|
||||||
set nbcross($env(os_type)) $nb
|
set nbcross([checkplatform]) $nb
|
||||||
|
@ -10,16 +10,16 @@ if { [string compare $command "shading"] == 0 } {
|
|||||||
set nbt 8
|
set nbt 8
|
||||||
set nbl 8
|
set nbl 8
|
||||||
set nbn 83
|
set nbn 83
|
||||||
set nbwithouttri($env(os_type)) $nbt
|
set nbwithouttri([checkplatform]) $nbt
|
||||||
set nbfree($env(os_type)) $nbl
|
set nbfree([checkplatform]) $nbl
|
||||||
set nbfreenodes($env(os_type)) $nbn
|
set nbfreenodes([checkplatform]) $nbn
|
||||||
} else {
|
} else {
|
||||||
set bug_withouttri "OCC23105"
|
set bug_withouttri "OCC23105"
|
||||||
##set nbt 14
|
##set nbt 14
|
||||||
set nbt 8
|
set nbt 8
|
||||||
set nbn 60
|
set nbn 60
|
||||||
set nbl 12
|
set nbl 12
|
||||||
set nbwithouttri($env(os_type)) $nbt
|
set nbwithouttri([checkplatform]) $nbt
|
||||||
set nbfree($env(os_type)) $nbl
|
set nbfree([checkplatform]) $nbl
|
||||||
set nbfreenodes($env(os_type)) $nbn
|
set nbfreenodes([checkplatform]) $nbn
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
set libname TKSTEP
|
set libname TKSTEP
|
||||||
|
|
||||||
switch -nocase $env(os_type) {
|
switch -nocase [checkplatform] {
|
||||||
windows {set libname ${libname}.dll}
|
windows {set libname ${libname}.dll}
|
||||||
linux {set libname lib${libname}.so}
|
linux {set libname lib${libname}.so}
|
||||||
macos {set libname lib${libname}.dylib}
|
macos {set libname lib${libname}.dylib}
|
||||||
|
@ -17,18 +17,7 @@ foreach line [split $info "\n"] {
|
|||||||
}
|
}
|
||||||
lappend values "$diff_cl"
|
lappend values "$diff_cl"
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set check_values { 1.2363286058767904
|
|
||||||
2.7537414143534
|
|
||||||
1.5596260162601621
|
|
||||||
3.937043746844462
|
|
||||||
1.2133020329576465
|
|
||||||
1.2164522569168656
|
|
||||||
1.2495457282327385
|
|
||||||
0.10352433841051313
|
|
||||||
0.45175659293697572
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
set check_values { 1.383409071179103
|
set check_values { 1.383409071179103
|
||||||
5.1472531605899908
|
5.1472531605899908
|
||||||
5.55719377028335395
|
5.55719377028335395
|
||||||
@ -40,18 +29,30 @@ if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
|||||||
0.21983563611646603
|
0.21983563611646603
|
||||||
}
|
}
|
||||||
if { [regexp {64} [dversion]] } {
|
if { [regexp {64} [dversion]] } {
|
||||||
set check_values { 1.5
|
set check_values { 1.5
|
||||||
5.2
|
5.2
|
||||||
5.7
|
5.7
|
||||||
5.7
|
5.7
|
||||||
1.7
|
1.7
|
||||||
1.3
|
1.3
|
||||||
1.6
|
1.6
|
||||||
0.4
|
0.4
|
||||||
0.4
|
0.4
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
set check_values { 1.2363286058767904
|
||||||
|
2.7537414143534
|
||||||
|
1.5596260162601621
|
||||||
|
3.937043746844462
|
||||||
|
1.2133020329576465
|
||||||
|
1.2164522569168656
|
||||||
|
1.2495457282327385
|
||||||
|
0.10352433841051313
|
||||||
|
0.45175659293697572
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
set index 0
|
set index 0
|
||||||
foreach key $keys {
|
foreach key $keys {
|
||||||
set value [lindex $values $index]
|
set value [lindex $values $index]
|
||||||
|
@ -15,18 +15,18 @@ foreach line [split $info "\n"] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set check_values { 0.1540285
|
|
||||||
0.1286995
|
|
||||||
0.1607561
|
|
||||||
0.3624441
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
set check_values { 0.018136771
|
set check_values { 0.018136771
|
||||||
0.008694706
|
0.008694706
|
||||||
0.019123649
|
0.019123649
|
||||||
0.784462745
|
0.784462745
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
set check_values { 0.1540285
|
||||||
|
0.1286995
|
||||||
|
0.1607561
|
||||||
|
0.3624441
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set index 0
|
set index 0
|
||||||
|
@ -15,18 +15,18 @@ foreach line [split $info "\n"] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if { [string compare $tcl_platform(platform) "windows"] != 0 } {
|
if { [checkplatform -windows] } {
|
||||||
set check_values { 0.1549615
|
|
||||||
0.1290805
|
|
||||||
0.1602191
|
|
||||||
0.3487175
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
set check_values { 0.017762852
|
set check_values { 0.017762852
|
||||||
0.008435507
|
0.008435507
|
||||||
0.018746851
|
0.018746851
|
||||||
0.079263713
|
0.079263713
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
set check_values { 0.1549615
|
||||||
|
0.1290805
|
||||||
|
0.1602191
|
||||||
|
0.3487175
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set index 0
|
set index 0
|
||||||
|
@ -22,12 +22,11 @@ if { [info exists test_image ] == 0 } {
|
|||||||
|
|
||||||
set WorkDirectory $imagedir
|
set WorkDirectory $imagedir
|
||||||
|
|
||||||
set env(os_type) $tcl_platform(platform)
|
if { [checkplatform -windows] } {
|
||||||
if { [regexp "indows" $env(os_type)] } {
|
|
||||||
if {[regexp -nocase {jdk} $env(PATH)] || [regexp -nocase {java} $env(PATH)]} {
|
if {[regexp -nocase {jdk} $env(PATH)] || [regexp -nocase {java} $env(PATH)]} {
|
||||||
set Java "java"
|
set Java "java"
|
||||||
} else {
|
} else {
|
||||||
puts "Warning: environment variable PATH doesn't contain path to Java"
|
puts "Warning: environment variable PATH doesn't contain path to Java"
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
catch {set Java $env(JAVAHOME)/bin/java}
|
catch {set Java $env(JAVAHOME)/bin/java}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user