From 7103432404fb6f76c38b51b8455736f42642127b Mon Sep 17 00:00:00 2001 From: Christian Stenger Date: Thu, 30 Jun 2022 08:58:11 +0200 Subject: [PATCH] Squish: Do not expect clang shipped by QC anymore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I2f09835bde52aa2f0cd90def7f6d8d628736ff56 Reviewed-by: Robert Löhning --- .../tst_default_settings/test.py | 40 ------------------- 1 file changed, 40 deletions(-) diff --git a/tests/system/suite_general/tst_default_settings/test.py b/tests/system/suite_general/tst_default_settings/test.py index bf0d55c6895..88b2160e5ea 100644 --- a/tests/system/suite_general/tst_default_settings/test.py +++ b/tests/system/suite_general/tst_default_settings/test.py @@ -171,37 +171,6 @@ def __kitFunc__(it, foundQt, foundCompNames): details = details.replace("", "").replace("", "") test.warning("Detected error and/or warning: %s" % details) -def __extendExpectedCompilersWithInternalClang__(expected): - global appContext - # QC ships a clang itself - regex = '^(.*(qtcreator(.exe)?|Qt Creator))( .*)?$' # QC with optional arguments - qcPath = re.match(regex, appContext.commandLine) - if qcPath is None: - test.warning("Regular expression failed.") - else: - qcPath = qcPath.group(1) - if platform.system() == 'Darwin': - internalClang = os.path.join(qcPath, '..', '..', 'Resources') - elif platform.system() in ('Windows', 'Microsoft'): - internalClang = os.path.join(qcPath, '..') - else: - internalClang = os.path.join(qcPath, '..', '..', 'libexec', 'qtcreator') - internalClang = os.path.join(internalClang, 'clang', 'bin', 'clang') - if platform.system() in ('Microsoft', 'Windows'): - internalClang += '-cl.exe' - internalClang = os.path.abspath(internalClang) - if os.path.exists(internalClang): - if platform.system() in ('Microsoft', 'Windows'): - # just add a fuzzy comparable name - everything else is not worth the effort here - expected.append({'^Default LLVM \d{2} bit based on MSVC\d{4}$':''}) - else: - expected.append(internalClang) - else: - test.fail("QC package seems to be faulty - missing internal provided clang.\nIf this " - "is not a package, but a self-compiled QC, just copy the clang executable " - "located inside the LLVM_INSTALL_DIR/bin (used while building) to the " - "expected path.", "Expected '%s'" % internalClang) - def __getExpectedCompilers__(): # TODO: enhance this to distinguish between C and C++ compilers expected = [] @@ -219,8 +188,6 @@ def __getExpectedCompilers__(): if xcodeClang and os.path.exists(xcodeClang) and xcodeClang not in expected: expected.append(xcodeClang) - __extendExpectedCompilersWithInternalClang__(expected) - for compiler in compilers: compilerPath = which(compiler) if compilerPath: @@ -309,13 +276,6 @@ def __compareCompilers__(foundCompilers, expectedCompilers): if isString(currentExp): continue key = currentExp.keys()[0] - # special case for (fuzzy) regex comparison on Windows (internal LLVM) - if isWin and key.startswith('^') and key.endswith('$'): - if re.match(key, currentFound.keys()[0], flags): - test.verify(os.path.exists(currentFound.values()[0].rsplit(" ", 1)[0]), - "Verifying whether shipped clang got set up.") - foundExp = True - break # the regex .*? is used for the different possible version strings of the WinSDK # if it's present a regex will be validated otherwise simple string comparison if (((".*?" in key and re.match(key, currentFound.keys()[0], flags))