blob: 2313403f5205dd673e83fa61b58bf4bc713a1ced (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
source $srcdir/$subdir/test.tcl
proc test_procedure {} {
global srcdir subdir
set wd [pwd]
set flags ""
if {$srcdir == ""} {
set pattern "*.c"
} else {
set pattern "$srcdir/$subdir/*.c"
}
# for first pass, force 64-bit compilation for 64-bit systems
# Add any other 64-bit arcvhitecture you want tested below.
# To find tcl's platform name for your machine, run the following:
# echo "puts $::tcl_platform(machine)" | tclsh
switch -regexp $::tcl_platform(machine) {
^ia64$ {
set do_64_bit_pass 1
set flags ""
}
^(x86_64|ppc64|s390x)$ {
set do_64_bit_pass 1
set flags "additional_flags=-m64"
}
default {
set do_64_bit_pass 0
}
}
if {$do_64_bit_pass} {
foreach filename [lsort [glob $pattern]] {
set testname [file tail [string range $filename 0 end-2]]
if {![installtest_p]} { untested $testname; continue }
send_log "Testing 64-bit ${testname}\n"
set res [run_one_test $filename $flags]
if {$res == "PASS"} {
pass "$testname"
} elseif {$res == "UNSUPP"} {
unsupported "$testname not supported on this arch"
} else {
fail "64-bit $testname"
send_log "$res\n"
}
}
}
set do_32_bit_pass 1
switch -regexp $::tcl_platform(machine) {
^(x86_64|ppc64)$ {
set flags "additional_flags=-m32"
}
^s390x$ {
set flags "additional_flags=-m31"
}
^ia64$ {
set do_32_bit_pass 0
}
}
if {$do_32_bit_pass} {
foreach filename [lsort [glob $pattern]] {
set testname [file tail [string range $filename 0 end-2]]
if {![installtest_p]} { untested $testname; continue }
send_log "Testing 32-bit ${testname}\n"
set res [run_one_test $filename $flags]
if {$res == "PASS"} {
pass "32-bit $testname"
} elseif {$res == "UNSUPP"} {
unsupported "$testname not supported on this arch"
} else {
fail "32-bit $testname"
send_log "$res\n"
}
}
}
}
test_procedure
|