elf2image test cases for ESP8266

Test runner supports esp32 but currently not enabled.
This commit is contained in:
Angus Gratton
2016-08-17 12:46:46 +08:00
parent 9a20756731
commit ab7680c81a
14 changed files with 256 additions and 0 deletions

View File

@@ -3,7 +3,9 @@ import io
import os
import re
import sys
import subprocess
from setuptools.command.test import test as TestCommand
if sys.version_info[0] > 2:
raise RuntimeError("esptool.py only supports Python 2.x")
@@ -27,6 +29,13 @@ def find_version(*file_paths):
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
class EspToolTests(TestCommand):
def run_tests(self):
# lazy test implementation for now, just run the test script standalone
errno = subprocess.check_call([ sys.executable, "./test/test_elf2image.py" ])
sys.exit(errno)
long_description = """
==========
esptool.py
@@ -86,6 +95,10 @@ setup(
install_requires=[
'pyserial',
],
tests_require=[
'pyelftools',
],
cmdclass = {'test': EspToolTests},
scripts=[
'esptool.py',
],