0027146: Create command checkplatform
[occt.git] / tests / bugs / modalg_5 / bug25019
CommitLineData
2d2aa6f1 1puts "============"
2puts "OCC25019"
3puts "============"
4puts ""
5###############################
6## Command "bsection" in Test Harness with flag build pcurve on second shape works slowly.
7###############################
8
9restore [locate_data_file bug25019_a_shape_1.brep] a1
10restore [locate_data_file bug25019_prism.brep] p1
11
12# 1.
13dchrono h1 reset
14dchrono h1 start
15
16bsection r a1 p1 -n2d2
17
18dchrono h1 stop
19set q1 [dchrono h1 show]
20
21# 2.
22dchrono h2 reset
23dchrono h2 start
24
25bsection r a1 p1
26
27dchrono h2 stop
28set q2 [dchrono h2 show]
29
30#
31regexp {CPU user time: ([-0-9.+eE]+) seconds} $q1 full t1
32puts "$t1"
863f782a 33if { [checkplatform -windows] } {
2d2aa6f1 34 puts "OS = Windows NT"
c9fb8529 35 set max_time1 20
2d2aa6f1 36} else {
37 puts "OS = Linux"
c9fb8529 38 set max_time1 30
2d2aa6f1 39}
40if { $t1 > ${max_time1} } {
41 puts "Elapsed time is more than ${max_time1} seconds - Faulty"
42} else {
43 puts "Elapsed time is less than ${max_time1} seconds - OK"
44}
45
46#
47regexp {CPU user time: ([-0-9.+eE]+) seconds} $q2 full t2
48puts "$t2"
863f782a 49if { [checkplatform -windows] } {
2d2aa6f1 50 puts "OS = Windows NT"
c9fb8529 51 set max_time2 20
2d2aa6f1 52} else {
53 puts "OS = Linux"
c9fb8529 54 set max_time2 30
2d2aa6f1 55}
56if { $t2 > ${max_time2} } {
57 puts "Elapsed time is more than ${max_time2} seconds - Faulty"
58} else {
59 puts "Elapsed time is less than ${max_time2} seconds - OK"
60}