8000 Run tests in parallel (#172) · wired8/lv_binding_micropython@f0407d8 · GitHub
[go: up one dir, main page]

Skip to content

Commit f0407d8

Browse files
authored
Run tests in parallel (lvgl#172)
1 parent f4a6818 commit f0407d8

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/unix_port.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- name: Install SDL
15+
- name: Install Dependencies
1616
run: |
1717
sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse"
1818
sudo apt-get update -y -qq
19-
sudo apt-get install libsdl2-dev
19+
sudo apt-get install libsdl2-dev parallel
2020
- name: Clone lv_micropython
2121
run: |
2222
git clone https://github.com/lvgl/lv_micropython.git .

tests/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@ set -e # Exit on error
44

55
SCRIPT_PATH="`dirname \"$0\"`"
66

7+
NUMCPUS=`nproc`
8+
79
TEST_PATH="$SCRIPT_PATH/../examples/*.py $SCRIPT_PATH/../lvgl/examples/"
810
EXCLUDE_PATH="$SCRIPT_PATH/../examples/fb_test.py $SCRIPT_PATH/../examples/uasyncio*.py"
911

1012
EXCLUDE_FINDEXP=$(echo $EXCLUDE_PATH | sed "s/^\|[[:space:]]/ -and -not -path /g")
1113

1214
find $TEST_PATH -name "*.py" $EXCLUDE_FINDEXP |\
13-
xargs -I {} timeout 5m catchsegv $SCRIPT_PATH/../../../ports/unix/micropython-dev $SCRIPT_PATH/run_test.py {}
15+
parallel --halt-on-error now,fail=1 --max-args=1 --max-procs $NUMCPUS -I {} timeout 5m catchsegv $SCRIPT_PATH/../../../ports/unix/micropython-dev $SCRIPT_PATH/run_test.py {}
1416

0 commit comments

Comments
 (0)
0