Skip to content

Commit f89c863

Browse files
committed
mpremote: Fix test suite for multiple-board situations.
Signed-off-by: Anson Mansfield <amansfield@mantaro.com>
1 parent 3805e65 commit f89c863

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tools/mpremote/tests/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.out

tools/mpremote/tests/run-mpremote-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22
set -e
33

4-
TEST_DIR=$(dirname $0)
5-
MPREMOTE=${TEST_DIR}/../mpremote.py
4+
TEST_DIR="${TEST_DIR:-$(dirname $0)}"
5+
MPREMOTE="${MPREMOTE:-${TEST_DIR}/../mpremote.py}"
66

77
if [ -z "$1" ]; then
88
# Find tests matching test_*.sh
@@ -16,7 +16,7 @@ for t in $TESTS; do
1616
TMP=$(mktemp -d)
1717
echo -n "${t}: "
1818
# Strip CR and replace the random temp dir with a token.
19-
if env MPREMOTE=${MPREMOTE} TMP="${TMP}" "${t}" 2>&1 | tr -d '\r' | sed "s,${TMP},"'${TMP},g' > "${t}.out"; then
19+
if env MPREMOTE="${MPREMOTE}" TMP="${TMP}" "${t}" 2>&1 | tr -d '\r' | sed "s,${TMP},"'${TMP},g' > "${t}.out"; then
2020
if diff "${t}.out" "${t}.exp" > /dev/null; then
2121
echo "OK"
2222
else

0 commit comments

Comments
 (0)