cmd_repeat.sh 409 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/sh
  2. # Test for U-Boot cli including command repeat
  3. BASE="$(dirname $0)"
  4. . $BASE/common.sh
  5. run_test() {
  6. ./${OUTPUT_DIR}/u-boot <<END
  7. setenv ctrlc_ignore y
  8. md 0
  9. reset
  10. END
  11. }
  12. check_results() {
  13. echo "Check results"
  14. grep -q 00000100 ${tmp} || fail "Command did not repeat"
  15. }
  16. echo "Test CLI repeat"
  17. echo
  18. tmp="$(tempfile)"
  19. build_uboot
  20. run_test >${tmp}
  21. check_results ${tmp}
  22. rm ${tmp}
  23. echo "Test passed"