1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-29 05:21:37 +03:00

device tests: updates for esptool.py (#6084)

Makefile new rule: 'make distclean' removes virtualenv
attempt to use python3 (python2 is still default)
This commit is contained in:
david gauchard
2019-05-14 17:59:46 +02:00
committed by Earle F. Philhower, III
parent 2df33de1e7
commit 818a55f575
3 changed files with 42 additions and 23 deletions

View File

@ -1,5 +1,6 @@
PYTHON_ENV_DIR=virtualenv
TEST_EXECUTABLE=test/test
PYTHON ?= python3
all: test
@ -10,7 +11,7 @@ clean:
rm -rf $(TEST_EXECUTABLE)
$(PYTHON_ENV_DIR):
virtualenv --no-site-packages $(PYTHON_ENV_DIR)
virtualenv --python=$(PYTHON) --no-site-packages $(PYTHON_ENV_DIR)
. $(PYTHON_ENV_DIR)/bin/activate && pip install -r requirements.txt
test: $(TEST_EXECUTABLE) $(PYTHON_ENV_DIR)

View File

@ -14,12 +14,18 @@ try:
except:
from ConfigParser import ConfigParser
import itertools
from urlparse import urlparse
try:
from urllib.parse import urlparse, urlencode
except ImportError:
from urlparse import urlparse
from junit_xml import TestSuite, TestCase
try:
from cStringIO import StringIO
except:
from StringIO import StringIO
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
import mock_decorators
debug = False