Skip to content

Commit 92d5a29

Browse files
committed
testsuite.py: Do not set the C++ discriminant for old toolchains
Change-Id: I0dcfe6cf878a913a259f9495ba77b6608f33041d TN: V816-018
1 parent 03176a1 commit 92d5a29

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

testsuite/testsuite.py

+14-1
Original file line numberDiff line numberDiff line change
@@ -1265,8 +1265,21 @@ def _discriminants(self):
12651265
self._toolchain_discriminants())
12661266

12671267
def _base_discriminants(self):
1268+
1269+
# List of toolchain discriminants for which we don't want to run
1270+
# C++ tests, due to lack of compatibility with modern hosts.
1271+
unsupported_cpp_toolchains = ["7.1.2", "5.04a1"]
1272+
12681273
result = ['ALL'] + self.env.discriminants
1269-
if which(self.tool('g++')):
1274+
1275+
toolchain_discrs = self._toolchain_discriminants()
1276+
1277+
# Only enable C++ tests if we have a C++ compiler that is not
1278+
# blacklisted.
1279+
if which(self.tool('g++')) and (
1280+
not toolchain_discrs
1281+
or toolchain_discrs[0] not in unsupported_cpp_toolchains
1282+
):
12701283
result.append('C++')
12711284

12721285
# Add a discriminant to track the current trace mode

0 commit comments

Comments
 (0)