forked from qt-creator/qt-creator
McuSupport: Add flag in JSON for adding a package path to system path
An entry called "addToSystemPath" was added to JSON files to signal
whether the corresponding path should also be added to the system path.
Task-number: UL-6409
Change-Id: I2d7ba38b3905d67475a3c482692e4f8e21d4141e
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Piotr Mućko <piotr.mucko@qt.io>
Reviewed-by: hjk <hjk@qt.io>
(cherry picked from commit fb643db088)
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -1454,4 +1454,21 @@ void McuSupportTest::test_defaultValueForEachOperationSystem()
|
||||
else
|
||||
QCOMPARE(QString("/usr/local/mcuxpressoide"), default_path_entry);
|
||||
};
|
||||
void McuSupportTest::test_addToSystemPathFlag()
|
||||
{
|
||||
const auto targetDescription = parseDescriptionJson(armgcc_stm32f769i_discovery_freertos_json);
|
||||
|
||||
const auto programmerPackage = targetDescription.platform.entries[0];
|
||||
const auto compilerPackage = targetDescription.toolchain.compiler;
|
||||
const auto toolchainFilePackage = targetDescription.toolchain.file;
|
||||
const auto boardSdkPackage = targetDescription.boardSdk;
|
||||
const auto freeRtosPackage = targetDescription.freeRTOS.package;
|
||||
|
||||
QCOMPARE(programmerPackage.shouldAddToSystemPath, true);
|
||||
QCOMPARE(compilerPackage.shouldAddToSystemPath, false);
|
||||
QCOMPARE(toolchainFilePackage.shouldAddToSystemPath, false);
|
||||
QCOMPARE(boardSdkPackage.shouldAddToSystemPath, false);
|
||||
QCOMPARE(freeRtosPackage.shouldAddToSystemPath, false);
|
||||
}
|
||||
|
||||
} // namespace McuSupport::Internal::Test
|
||||
|
||||
Reference in New Issue
Block a user