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
81
82
83
84
85
|
# 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"
|