diff options
author | Denis Shienkov <denis.shienkov@gmail.com> | 2020-08-02 21:30:47 +0300 |
---|---|---|
committer | Denis Shienkov <denis.shienkov@gmail.com> | 2020-08-04 16:38:41 +0000 |
commit | ec3181bb83f223b18b029d5776f427a3019f2381 (patch) | |
tree | 90e3a1c8d5475fcc1d2fd025c4f5fd722ac2fe3a /tests/auto/blackbox/tst_blackboxbaremetal.cpp | |
parent | 410ba29770614457e0d5d6b45d782967d6849b3c (diff) |
baremetal: Introduce new 'none' choosing for qbs.targetPlatform
This 'none' value should be used for a bare-metal toolchains
in the qbs.targetPlatform and the qbs.targetOS properties.
Now this value is set in the profiles during automatic detection
of such toolchains as IAR, KEIL and SDCC.
Take into account, that it is impossible to do the same and for
the GCC toolchain, because there are not exists a proper way to
know that a current GCC is for a 'bare-metal'. So, the users
should change the qbs.targetPlatform manually.
Change-Id: I178fd526bbb5ae44f18e35ff12970ed0718c476d
Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'tests/auto/blackbox/tst_blackboxbaremetal.cpp')
-rw-r--r-- | tests/auto/blackbox/tst_blackboxbaremetal.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/blackbox/tst_blackboxbaremetal.cpp b/tests/auto/blackbox/tst_blackboxbaremetal.cpp index 2f6169ff9..ba71ae954 100644 --- a/tests/auto/blackbox/tst_blackboxbaremetal.cpp +++ b/tests/auto/blackbox/tst_blackboxbaremetal.cpp @@ -52,6 +52,24 @@ TestBlackboxBareMetal::TestBlackboxBareMetal() { } +void TestBlackboxBareMetal::targetPlatform() +{ + QDir::setCurrent(testDataDir + "/target-platform"); + QCOMPARE(runQbs(QbsRunParameters("resolve", QStringList("-n"))), 0); + if (!m_qbsStdout.contains("unsupported toolset:")) { + const bool hasNoPlatform = m_qbsStdout.contains("has no platform: true"); + QCOMPARE(hasNoPlatform, true); + const bool hasNoOS = m_qbsStdout.contains("has no os: true"); + QCOMPARE(hasNoOS, true); + } else { + QByteArray toolchain; + QByteArray architecture; + extractUnsupportedToolset(m_qbsStdout, toolchain, architecture); + QSKIP("Unsupported toolchain '" + toolchain + + "' for architecture '" + architecture + "'"); + } +} + void TestBlackboxBareMetal::application_data() { QTest::addColumn<QString>("testPath"); |