forked from spike-rt/pybricks-micropython
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest-ev3dev.sh
More file actions
executable file
·24 lines (19 loc) · 777 Bytes
/
test-ev3dev.sh
File metadata and controls
executable file
·24 lines (19 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/bin/sh
#
# Runs tests on ev3dev port.
#
# Use `--list-test` to list tests or `--include <regex>` to run single tests.
#
set -e
SCRIPT_DIR=$(dirname "$0")
BRICK_DIR="$SCRIPT_DIR/bricks/ev3dev"
MP_TEST_DIR="$SCRIPT_DIR/micropython/tests"
PB_TEST_DIR=$(readlink -f "$SCRIPT_DIR/tests")
BUILD_DIR=$(readlink -f "$BRICK_DIR/build-test")
rm -f "$BRICK_DIR/pybricks-micropython"
make -s -j $(nproc --all) -C "$BRICK_DIR" pybricks-micropython build-test/libgrx-3.0-vdriver-test.so CROSS_COMPILE= DEBUG=1 COPT=-O0 BUILD=build-test
export MICROPY_MICROPYTHON="$PB_TEST_DIR/ev3dev/test-wrapper.sh"
export GRX_PLUGIN_PATH="$BUILD_DIR"
export GRX_DRIVER=test
cd "$MP_TEST_DIR"
./run-tests.py --test-dirs $(find "$PB_TEST_DIR/ev3dev" -type d) "$@" || ./run-tests.py --print-failures