File tree Expand file tree Collapse file tree 3 files changed +52
-17
lines changed
Expand file tree Collapse file tree 3 files changed +52
-17
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ # Test for U-Boot cli including command repeat
4+
5+ BASE=" $( dirname $0 ) "
6+ . $BASE /common.sh
7+
8+ run_test () {
9+ ./${OUTPUT_DIR} /u-boot << END
10+ setenv ctrlc_ignore y
11+ md 0
12+
13+ reset
14+ END
15+ }
16+ check_results () {
17+ echo " Check results"
18+
19+ grep -q 00000100 ${tmp} || fail " Command did not repeat"
20+ }
21+
22+ echo " Test CLI repeat"
23+ echo
24+ tmp=" $( tempfile) "
25+ build_uboot
26+ run_test > ${tmp}
27+ check_results ${tmp}
28+ rm ${tmp}
29+ echo " Test passed"
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ OUTPUT_DIR=sandbox
4+
5+ fail () {
6+ echo " Test failed: $1 "
7+ if [ -n ${tmp} ]; then
8+ rm ${tmp}
9+ fi
10+ exit 1
11+ }
12+
13+ build_uboot () {
14+ echo " Build sandbox"
15+ OPTS=" O=${OUTPUT_DIR} $1 "
16+ NUM_CPUS=$( grep -c processor /proc/cpuinfo)
17+ echo ${OPTS}
18+ make ${OPTS} sandbox_config
19+ make ${OPTS} -s -j${NUM_CPUS}
20+ }
Original file line number Diff line number Diff line change 55
66# Simple test script for tracing with sandbox
77
8- OUTPUT_DIR=sandbox
98TRACE_OPT=" FTRACE=1"
109
11- fail () {
12- echo " Test failed: $1 "
13- if [ -n ${tmp} ]; then
14- rm ${tmp}
15- fi
16- exit 1
17- }
18-
19- build_uboot () {
20- echo " Build sandbox"
21- OPTS=" O=${OUTPUT_DIR} ${TRACE_OPT} "
22- NUM_CPUS=$( grep -c processor /proc/cpuinfo)
23- make ${OPTS} sandbox_config
24- make ${OPTS} -s -j${NUM_CPUS}
25- }
10+ BASE=" $( dirname $0 ) /.."
11+ . $BASE /common.sh
2612
2713run_trace () {
2814 echo " Run trace"
@@ -69,7 +55,7 @@ check_results() {
6955echo " Simple trace test / sanity check using sandbox"
7056echo
7157tmp=" $( tempfile) "
72- build_uboot
58+ build_uboot " ${TRACE_OPT} "
7359run_trace > ${tmp}
7460check_results ${tmp}
7561rm ${tmp}
You can’t perform that action at this time.
0 commit comments