Fix bug with invalid process's "return code" when PlatformIO has internal error

This commit is contained in:
Ivan Kravets
2015-02-19 22:02:50 +02:00
parent 1fc6b222ec
commit 2d53d2100d
7 changed files with 48 additions and 22 deletions

View File

@ -30,9 +30,8 @@ def test_run(platformio_setup, pioproject_dir):
["platformio", "run"],
cwd=pioproject_dir
)
output = "%s\n%s" % (result['out'], result['err'])
if "error" in output.lower():
pytest.fail(output)
if result['returncode'] != 0:
pytest.fail(result)
# check .elf file
pioenvs_dir = join(pioproject_dir, ".pioenvs")