diff --git a/HISTORY.rst b/HISTORY.rst index f1f50e0b..b0b8d55a 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -8,6 +8,7 @@ PlatformIO 3.0 ~~~~~~~~~~~~~~~~~~ * Disable SSL Server-Name-Indication for Python < 2.7.9 +* Return valid exit code from ``plaformio test`` command 3.0.1 (2016-09-08) ~~~~~~~~~~~~~~~~~~ diff --git a/platformio/pioplus.py b/platformio/pioplus.py index edfc1166..3fe18eba 100644 --- a/platformio/pioplus.py +++ b/platformio/pioplus.py @@ -17,7 +17,7 @@ import subprocess from os.path import dirname, join from platform import system -from platformio import util +from platformio import exception, util from platformio.managers.package import PackageManager PACKAGE_PIOPLUS_NAME = "tool-pioplus" @@ -54,4 +54,5 @@ def pioplus_call(args, **kwargs): os.environ['LD_LIBRARY_PATH'] = dirname(pioplus_path) os.environ['PYTHONEXEPATH'] = util.get_pythonexe_path() util.copy_pythonpath_to_osenv() - subprocess.call([pioplus_path] + args, **kwargs) + if subprocess.call([pioplus_path] + args, **kwargs) != 0: + raise exception.ReturnErrorCode()