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:
@ -65,8 +65,8 @@ $(TEST_LIST):
|
||||
ifeq ("$(MOCK)", "1")
|
||||
@echo Compiling $(notdir $@)
|
||||
(cd ../host; make D=$(V) ULIBDIRS=../device/libraries/BSTest ../device/$(@:%.ino=%))
|
||||
$(SILENT)source $(BS_DIR)/virtualenv/bin/activate && \
|
||||
$(PYTHON) $(BS_DIR)/runner.py \
|
||||
$(SILENT)$(BS_DIR)/virtualenv/bin/python \
|
||||
$(BS_DIR)/runner.py \
|
||||
$(RUNNER_DEBUG_FLAG) \
|
||||
-e "$(ESP8266_CORE_PATH)/tests/host/bin/$(@:%.ino=%)" \
|
||||
-n $(basename $(notdir $@)) \
|
||||
@ -120,8 +120,8 @@ ifneq ("$(NO_RUN)","1")
|
||||
--port $(UPLOAD_PORT) \
|
||||
--baud $(UPLOAD_BAUD) \
|
||||
read_flash_status $(REDIR) # reset
|
||||
$(SILENT)source $(BS_DIR)/virtualenv/bin/activate && \
|
||||
$(PYTHON) $(BS_DIR)/runner.py \
|
||||
$(SILENT)$(BS_DIR)/virtualenv/bin/python \
|
||||
$(BS_DIR)/runner.py \
|
||||
$(RUNNER_DEBUG_FLAG) \
|
||||
-p $(UPLOAD_PORT) \
|
||||
-n $(basename $(notdir $@)) \
|
||||
|
Reference in New Issue
Block a user