Jim Mussared 6461ffd9d1 tools/mpremote: Add initial regression tests for mpremote.
These tests are specifically for the command-line interface and cover:
 - resume/soft-reset/connect/disconnect
 - mount
 - fs cp,touch,mkdir,cat,sha256sum,rm,rmdir
 - eval/exec/run

This work was funded through GitHub Sponsors.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
2024-10-09 16:39:00 +11:00

24 lines
564 B
Bash
Executable File

#!/bin/bash
set -e
# The eval command will continue the state of the exec.
echo -----
$MPREMOTE exec "a = 'hello'" eval "a"
# Automatic soft reset. `a` will trigger NameError.
echo -----
$MPREMOTE eval "a" || true
# Resume will skip soft reset.
echo -----
$MPREMOTE exec "a = 'resume'"
$MPREMOTE resume eval "a"
# The eval command will continue the state of the exec.
echo -----
$MPREMOTE exec "a = 'soft-reset'" eval "a" soft-reset eval "1+1" eval "a" || true
# A disconnect will trigger auto-reconnect.
echo -----
$MPREMOTE eval "1+2" disconnect eval "2+3"