From c4a9fb3851b9764e2a9006a4388bc48dd9921c13 Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Tue, 19 Mar 2019 17:36:28 -0500 Subject: [PATCH] Test detection of Mbed Studio version of ARMC6 --- tools/test/toolchains/api_test.py | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/tools/test/toolchains/api_test.py b/tools/test/toolchains/api_test.py index 7eca567700..6dc6a143c4 100644 --- a/tools/test/toolchains/api_test.py +++ b/tools/test/toolchains/api_test.py @@ -92,7 +92,33 @@ def test_armc6_version_check(_run_cmd): """, "", 0) toolchain.version_check() - assert notifier.messages == [] + assert notifier.messages == [] + assert not toolchain.is_mbed_studio_armc6 + + _run_cmd.return_value = (""" + armclang: error: Failed to check out a license. + The provided license does not enable these tools. + Information about this error is available at: http://ds.arm.com/support/lic56/m5 + General licensing information is available at: http://ds.arm.com/support/licensing/ + If you need further help, provide this complete error report to your supplier or license.support@arm.com. + - ARMLMD_LICENSE_FILE: unset + - LM_LICENSE_FILE: unset + - ARM_TOOL_VARIANT: unset + - ARM_PRODUCT_PATH: unset + - Product location: C:\MbedStudio\tools\ac6\sw\mappings + - Toolchain location: C:\MbedStudio\tools\ac6\bin + - Selected tool variant: product + - Checkout feature: mbed_armcompiler + - Feature version: 5.0201810 + - Flex error code: -5 + Product: ARM Compiler 6.11 for Mbed Studio + Component: ARM Compiler 6.11 + Tool: armclang [5d3b3c00] + """, "", 0) + + toolchain.version_check() + assert notifier.messages == [] + assert toolchain.is_mbed_studio_armc6 @patch('tools.toolchains.iar.run_cmd') def test_iar_version_check(_run_cmd):