1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-08-01 03:47:23 +03:00

Fix python warnings and update device tests runner (#8623)

Update soon-to-be deprecated code in the runner.py
https://docs.python.org/3/library/imp.html is deprecated since 3.4, will be removed in 3.12
https://docs.python.org/3/library/configparser.html readfp() is replaced with read_file() since 3.2, will be removed in 3.12

Use venv instead of virtualenv. We don't really use any of the extended features, and might as well simplify installation requirements.
virtualenv/bin/python can execute runner.py inside of venv, no need to activate beforehand.
This commit is contained in:
Max Prokhorov
2022-06-29 14:27:42 +03:00
committed by GitHub
parent a2c8a63360
commit 601da8e933
3 changed files with 13 additions and 11 deletions

View File

@ -11,11 +11,11 @@ clean:
rm -rf $(TEST_EXECUTABLE)
$(PYTHON_ENV_DIR):
virtualenv --python=$(PYTHON) --no-site-packages $(PYTHON_ENV_DIR)
. $(PYTHON_ENV_DIR)/bin/activate && pip install -r requirements.txt
$(PYTHON) -mvenv $(PYTHON_ENV_DIR)
$(PYTHON_ENV_DIR)/bin/pip install -r requirements.txt
test: $(TEST_EXECUTABLE) $(PYTHON_ENV_DIR)
. $(PYTHON_ENV_DIR)/bin/activate && $(PYTHON) runner.py -e $(TEST_EXECUTABLE) -m test/test.py
$(PYTHON_ENV_DIR)/bin/python runner.py -e $(TEST_EXECUTABLE) -m test/test.py
$(TEST_EXECUTABLE): test/test.cpp
g++ -std=c++11 -Isrc -o $@ test/test.cpp