mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
fix minor issues in test runner scripts on device (#4542)
* tests/device/Makefile: use bourne shell compatible "." instead ot "source" (ubuntu's dash does not understand it) * tests/device: make BEGINTIMEOUT a new error return value instead of a test-process-breaking exception
This commit is contained in:
parent
6580bf3477
commit
2013af1b19
@ -11,10 +11,10 @@ clean:
|
|||||||
|
|
||||||
$(PYTHON_ENV_DIR):
|
$(PYTHON_ENV_DIR):
|
||||||
virtualenv --no-site-packages $(PYTHON_ENV_DIR)
|
virtualenv --no-site-packages $(PYTHON_ENV_DIR)
|
||||||
source $(PYTHON_ENV_DIR)/bin/activate && pip install -r requirements.txt
|
. $(PYTHON_ENV_DIR)/bin/activate && pip install -r requirements.txt
|
||||||
|
|
||||||
test: $(TEST_EXECUTABLE) $(PYTHON_ENV_DIR)
|
test: $(TEST_EXECUTABLE) $(PYTHON_ENV_DIR)
|
||||||
source $(PYTHON_ENV_DIR)/bin/activate && python runner.py -e $(TEST_EXECUTABLE)
|
. $(PYTHON_ENV_DIR)/bin/activate && python runner.py -e $(TEST_EXECUTABLE)
|
||||||
|
|
||||||
$(TEST_EXECUTABLE): test/test.cpp
|
$(TEST_EXECUTABLE): test/test.cpp
|
||||||
g++ -std=c++11 -Isrc -o $@ test/test.cpp
|
g++ -std=c++11 -Isrc -o $@ test/test.cpp
|
||||||
|
@ -32,6 +32,7 @@ class BSTestRunner(object):
|
|||||||
FAIL = 1
|
FAIL = 1
|
||||||
TIMEOUT = 2
|
TIMEOUT = 2
|
||||||
CRASH = 3
|
CRASH = 3
|
||||||
|
BEGINTIMEOUT = 4
|
||||||
|
|
||||||
def __init__(self, spawn_obj, name, mocks):
|
def __init__(self, spawn_obj, name, mocks):
|
||||||
self.sp = spawn_obj
|
self.sp = spawn_obj
|
||||||
@ -116,7 +117,7 @@ class BSTestRunner(object):
|
|||||||
time.sleep(0.1)
|
time.sleep(0.1)
|
||||||
timeout -= 0.1
|
timeout -= 0.1
|
||||||
if timeout <= 0:
|
if timeout <= 0:
|
||||||
raise 'test begin timeout'
|
return BSTestRunner.BEGINTIMEOUT
|
||||||
while timeout > 0:
|
while timeout > 0:
|
||||||
res = self.sp.expect([r'>>>>>bs_test_check_failure line=(\d+)',
|
res = self.sp.expect([r'>>>>>bs_test_check_failure line=(\d+)',
|
||||||
r'>>>>>bs_test_end line=(\d+) result=(\d+) checks=(\d+) failed_checks=(\d+)',
|
r'>>>>>bs_test_end line=(\d+) result=(\d+) checks=(\d+) failed_checks=(\d+)',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user