diff --git a/tests/README.md b/tests/README.md index 9e2a6b9..90b08a8 100644 --- a/tests/README.md +++ b/tests/README.md @@ -15,6 +15,13 @@ C testing framework. There's a test runner script `test_runner.py` written in Python3 that runs test cases on ESP8266 connected to a host. +### Requirements and dependencies + +* Python3 version > 3.4 `sudo apt-get install python3 python3-pip` +* pyserial `sudo pip3 install pyserial` +* ESP8266 board with reset to boot mode support +* Two ESP8266 for dual mode test cases + Test runner is heavily relying on device reset using DTR and RTS signals. Popular ESP8266 boards such as **NodeMcu** and **Wemos D1** support device reset into flash mode. diff --git a/tests/test_runner.py b/tests/test_runner.py index 104058c..347fd9b 100755 --- a/tests/test_runner.py +++ b/tests/test_runner.py @@ -291,8 +291,8 @@ def flash_image(serial_port): verbose_print("Building and flashing test image to %s..." % serial_port) try: stdout = sys.stdout if verbose else None - subprocess.run(["make", "flash"], check=True, cwd=get_testdir(), - stdout=stdout, stderr=subprocess.STDOUT, env=env) + subprocess.check_call(["make", "flash"], cwd=get_testdir(), + stdout=stdout, stderr=subprocess.STDOUT, env=env) except subprocess.CalledProcessError as e: raise TestRunnerError("'make flash EPPORT=%s' failed with exit code %d" % (serial_port, e.returncode))