File tree Expand file tree Collapse file tree 6 files changed +17
-5
lines changed Expand file tree Collapse file tree 6 files changed +17
-5
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ DIST_SUBDIRS += testing
3434SUBDIRS += tools/syntacore
3535DIST_SUBDIRS += tools/syntacore
3636
37+ SUBDIRS += testing
38+ DIST_SUBDIRS += testing
39+
3740# common flags used in openocd build
3841AM_CFLAGS = $(GCC_WARNINGS )
3942AM_LDFLAGS =
Original file line number Diff line number Diff line change @@ -1017,7 +1017,7 @@ static const struct command_registration jtag_subcommand_handlers[] = {
10171017 },
10181018 {
10191019 .name = "execute" ,
1020- .mode = COMMAND_ANY ,
1020+ .mode = COMMAND_EXEC ,
10211021 .handler = handle_jtag_execute ,
10221022 .help = "Execute a chain of JTAG commands" ,
10231023 .usage = "['scan' tap_name+ ['" JTAG_EXECUTE_SCAN_IR_START_ARG
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ namespace import jtag_dummy_testing::*
55
66set ntaps 1
77setup $ntaps
8+ init
89
910set tap [lindex [jtag names] 0]
1011
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ namespace import jtag_dummy_testing::*
55
66set ntaps 1
77setup $ntaps
8+ init
89
910set tap [lindex [jtag names] 0]
1011
Original file line number Diff line number Diff line change @@ -4,11 +4,15 @@ namespace import testing_helpers::*
44namespace import jtag_dummy_testing::*
55
66set ntaps 2
7- setup $ntaps
87
8+ setup $ntaps
99set tap [lindex [jtag names] 0]
1010set second_tap [lindex [jtag names] 1]
1111
12+ check_generic_error {jtag execute scan $tap -ir 0}
13+
14+ init
15+
1216set escaped_tap [string map {. {\.}} $tap]
1317
1418jtag execute scan $tap
Original file line number Diff line number Diff line change @@ -26,6 +26,10 @@ namespace eval testing_helpers {
2626 }
2727 }
2828
29+ proc check_generic_error script {
30+ tailcall check_for_error 1 {} $script
31+ }
32+
2933 proc check_invalid_arg script {
3034 tailcall check_for_error -603 {} $script
3135 }
@@ -50,8 +54,8 @@ namespace eval testing_helpers {
5054 Was expecting '$pattern '."
5155 }
5256
53- namespace export check_invalid_arg check_syntax_err check_overflow_err \
54- check_underflow_err check_matches
57+ namespace export check_generic_error check_invalid_arg check_syntax_err \
58+ check_overflow_err check_underflow_err check_matches
5559}
5660
5761namespace eval jtag_dummy_testing {
@@ -67,7 +71,6 @@ namespace eval jtag_dummy_testing {
6771 for {set i 0} {$i < $ntaps } {incr i} {
6872 jtag newtap " tap$i " tap -irlen 1
6973 }
70- init
7174 dummy update_context
7275 dummy_set_default_handlers
7376
You can’t perform that action at this time.
0 commit comments