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 set do_64_bit_pass 0 if {$::tcl_platform(machine) == "x86_64" || $::tcl_platform(machine) == "ppc64" || $::tcl_platform(machine) == "s390x" } { set do_64_bit_pass 1 set flags "additional_flags=-m64" } if { $::tcl_platform(machine) == "ia64" } { set do_64_bit_pass 1 } if {$do_64_bit_pass} { foreach filename [lsort [glob $pattern]] { set file [file tail [string range $filename 0 end-2]] if {![installtest_p]} { untested $file; continue } target_compile $filename $wd/$file executable $flags send_log "Testing 64-bit ${file}\n" set res [exec $srcdir/$subdir/test.tcl $file $filename] if {$res == "PASS"} { pass "$file" } elseif {$res == "UNSUPP"} { unsupported "$file not supported on this arch" } else { fail "64-bit $file" send_log "$res\n" } catch {exec rm -f $wd/$file} } } set do_32_bit_pass 1 set flags "additional_flags=-m32" # add any 64-bit only machines to this statement if { $::tcl_platform(machine) == "ia64" } { set do_32_bit_pass 0 } if { $::tcl_platform(machine) == "s390x" } { set flags "additional_flags=-m31" } if {$do_32_bit_pass} { foreach filename [lsort [glob $pattern]] { set file [file tail [string range $filename 0 end-2]] if {![installtest_p]} { untested $file; continue } target_compile $filename $wd/$file executable $flags send_log "Testing 32-bit ${file}\n" set res [exec $srcdir/$subdir/test.tcl $file $filename] if {$res == "PASS"} { pass "32-bit $file" } elseif {$res == "UNSUPP"} { unsupported "$file not supported on this arch" } else { fail "32-bit $file" send_log "$res\n" } catch {exec rm -f $wd/$file} } } } set timeout 600 test_procedure