1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-29 05:21:37 +03:00
Files
esp8266/tests/device/libraries/BSTest/Makefile
Max Prokhorov 601da8e933 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.
2022-06-29 14:27:42 +03:00

24 lines
512 B
Makefile

PYTHON_ENV_DIR=virtualenv
TEST_EXECUTABLE=test/test
PYTHON ?= python3
all: test
install: $(PYTHON_ENV_DIR)
clean:
rm -rf $(PYTHON_ENV_DIR)
rm -rf $(TEST_EXECUTABLE)
$(PYTHON_ENV_DIR):
$(PYTHON) -mvenv $(PYTHON_ENV_DIR)
$(PYTHON_ENV_DIR)/bin/pip install -r requirements.txt
test: $(TEST_EXECUTABLE) $(PYTHON_ENV_DIR)
$(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
.PHONY: test clean install all