From d7fe808810d55203ec5f6d29d6cb9fe376ae3923 Mon Sep 17 00:00:00 2001 From: sheinz Date: Wed, 26 Oct 2016 17:26:38 +0300 Subject: [PATCH] Python3.4 support. README.md update --- tests/README.md | 7 +++++++ tests/test_runner.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) 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))