- A board with MicroPython firmware installed
- Connected via serial port to the host running the tests
Its a bit of a hack, but it works on my machine.
- Install Python3.x for Windows (no need to install a sepearet Linux version of Python)
- Install Git for Windows ( which includes bash running under MINGW64 )
-
Start a bash shell in the MicroPython directory you can do this from explore, windows terminal , or in VSCode depending on your workflow preferences
-
cd tools/mpremote/tests
-
Create a virtual environment using the windows version of python:
python.exe -m venv .venv-bash
-
HACK: the shebang in the scripts refer to
/usr/bin/env python3
, which doesn't exist on Windows by convention so create a copy of python.exe in the .venv-bash/Scripts directory and name it python3.execp .venv-bash/Scripts/python.exe .venv-bash/Scripts/python3.exe
-
activate the virtual environment
source .venv-bash/Scripts/activate
-
install the dependencies for mpremote
pip install -r ../requirements.txt
- activate the virtual environment
source .venv-bash/Scripts/activate
- run the tests
bash run-mpremote-tests.sh