Skip to content

Commit b7844ed

Browse files
Fix unittest.sh for aiorepl
1 parent 361f8b8 commit b7844ed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/unittest.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
mydir=$(readlink -f "$0")
44
mydir=$(dirname "$mydir")
55
testdir="$mydir"
6+
#testdir=/home/user/projects/MicroPythonOS/claude/MicroPythonOS/tests2
67
scriptdir=$(readlink -f "$mydir"/../scripts/)
78
fs="$mydir"/../internal_filesystem/
89
mpremote="$mydir"/../lvgl_micropython/lib/micropython/tools/mpremote/mpremote.py
@@ -124,7 +125,8 @@ if [ -z "$onetest" ]; then
124125
echo "If no test is specified: run all tests from $testdir on local machine."
125126
echo
126127
echo "The '--ondevice' flag will run the test(s) on a connected device using mpremote.py (should be on the PATH) over a serial connection."
127-
while read file; do
128+
files=$(find "$testdir" -iname "test_*.py" )
129+
for file in $files; do
128130
one_test "$file"
129131
result=$?
130132
if [ $result -ne 0 ]; then
@@ -134,7 +136,7 @@ if [ -z "$onetest" ]; then
134136
else
135137
ran=$(expr $ran \+ 1)
136138
fi
137-
done < <( find "$testdir" -iname "test_*.py" )
139+
done
138140
else
139141
echo "doing $onetest"
140142
one_test $(readlink -f "$onetest")

0 commit comments

Comments
 (0)