OSDN Git Service

* public snapshot of sid simulator
[pf3gnuchains/pf3gnuchains3x.git] / sid / component / testsuite / sidcomp.consoles / stdioval.exp
1 # Testsuite for the standard I/O console.
2 #
3 # Copyright (C) 1999 Red Hat
4
5 set test "sid configuration"
6 sid_config_component_etc_test_with_tracing "stdio2.conf" \
7     "load [sid_find_file libconsoles.la] console_component_library" \
8     "sid-io-stdio" \
9     "connect-pin main perform-activity -> wrapper poll"
10 pass $test
11
12 set test "sid start"
13 if {[sid_start "stdio2.conf"]} { pass $test } else { fail $test ; return }
14
15 set test "check attribute list"
16 sid_assert_includes_all "sid::component::attribute_names $victim" "state-snapshot"
17
18 set test "check attribute pin list"
19 set category "pin"
20 set pattr [sid_cmd "sid::component::attribute_names_in_category $victim $category"]
21 if { $pattr == "" } then { pass $test } else { fail $test }
22
23 set test "check attribute register list"
24 set category "register"
25 set rattr [sid_cmd "sid::component::attribute_names_in_category $victim $category"]
26 if { $rattr == "" } then { pass $test } else { fail $test }
27
28 set test "check attribute setting list"
29 set category "setting"
30 set sattr [sid_cmd "sid::component::attribute_names_in_category $victim $category"]
31 if { $sattr == "" } then { pass $test } else { fail $test }
32
33 set test "check attribute watchable list"
34 set category "watchable"
35 set wattr [sid_cmd "sid::component::attribute_names_in_category $victim $category"]
36 if { $wattr == "" } then { pass $test } else { fail $test }
37
38 set test "check pin names"
39 sid_assert_includes_all "sid::component::pin_names $victim" {stdin stdout poll}
40
41 set test "check bus names"
42 set bus [sid_cmd "sid::component::bus_names $victim"]
43 if { $bus == "" } then { pass $test } else { fail $test }
44
45 set test "check accessor names"
46 set acc [sid_cmd "sid::component::accessor_names $victim"]
47 if { $acc == "" } then { pass $test } else { fail $test }
48
49 set test "check relationship names"
50 set rel [sid_cmd "sid::component::relationship_names $victim"]
51 if { $rel == "" } then { pass $test } else { fail $test }
52
53 set test "sid stop"
54 if {[sid_stop]} { pass $test } else { fail $test ; return }
55
56 # zap temp file if tests were successful
57 global exit_status
58 if {$exit_status == "0"} { file delete "stdio2.conf" }