# test configuration support -*- Tcl -*- if [ file exists $srcdir/$subdir/default_procs.tcl ] { source $srcdir/$subdir/default_procs.tcl } else { puts "ERROR: $srcdir/$subdir/default_procs.tcl doesn't exist" } if [ file exists $srcdir/../lib/framework.exp] { source $srcdir/../lib/framework.exp } else { puts "ERROR: $srcdir/../lib/framework.exp doesn't exist" } set all_flag 1 set host_triplet i586-unknown-linux set target_triplet i586-unknown-linux set target_cpu i586 set target_os linux set build_triplet i586-unknown-linux # # Tests for a native configuration # run_tests [subst { { lib_bool_test isbuild {$build_triplet} true "isbuild, native" } { lib_bool_test isbuild {$target_cpu-*-$target_os} true "isbuild, native regexp" } { lib_bool_test isbuild {hppa-ibm-macos} false "isbuild, native bogus config string" } { "#" "test default argument for isbuild" } { lib_ret_test isbuild {} $build_triplet "isbuild with no arguments" } { "#" "ishost tests" } { lib_bool_test ishost {$host_triplet} true "ishost, native" } { lib_bool_test ishost {$target_cpu-*-$target_os} true "ishost, native regexp" } { lib_bool_test ishost {hppa-ibm-macos} false "ishost, native bogus config string" } { "#" "test default argument for ishost" } { lib_ret_test ishost {} $host_triplet "ishost with no arguments" } { "#" "istarget tests" } { lib_bool_test istarget {$target_triplet} true "istarget, native" } { lib_bool_test istarget {$target_cpu-*-$target_os} true "istarget, native regexp" } { lib_bool_test istarget {hppa-ibm-macos} false "istarget, native bogus config string" } { "#" "test default argument for istarget" } { lib_ret_test istarget {} $target_triplet "istarget with no arguments" } }] run_tests { { lib_bool_test isnative {} true "isnative, native" } { lib_bool_test is3way {} false "is3way, native" } } # # Tests for a normal cross configuration # set target_triplet m68k-unknown-elf run_tests { { lib_bool_test isnative {} false "isnative, cross" } { lib_bool_test is3way {} false "is3way, cross" } } # # Tests for a canadian cross configuration # set host_triplet i386-unknown-winnt run_tests { { lib_bool_test isnative {} false "isnative, canadian cross" } { lib_bool_test is3way {} true "is3way, canadian cross" } } puts "END config.test"