Commit dbde38f1 authored by Sergio Martins's avatar Sergio Martins

inefficient-qlist: Disable flaky test on arm 32bit

This check will be disabled in master, so no point wasting time.
People are already (re-)porting QVector->QList due to Qt6 changes,
so let's not confuse people more.

CCBUG: 413169
parent e72a8dba
{
"tests" : [
{
"filename" : "main.cpp"
"filename" : "main.cpp",
"should_run_on_32bit" : false
}
]
}
......@@ -46,6 +46,7 @@ class Test:
self.ignore_dirs = ""
self.has_fixits = False
self.should_run_fixits_test = False
self.should_run_on_32bit = True
def filename(self):
if len(self.filenames) == 1:
......@@ -239,6 +240,8 @@ def load_json(check_name):
test.header_filter = t['header_filter']
if 'ignore_dirs' in t:
test.ignore_dirs = t['ignore_dirs']
if 'should_run_on_32bit' in t:
test.should_run_on_32bit = t['should_run_on_32bit']
if not test.checks:
test.checks.append(test.check.name)
......@@ -558,6 +561,9 @@ def file_contains(filename, text):
f.close()
return text in contents
def is32Bit():
return platform.architecture()[0] == '32bit'
def run_unit_test(test, is_standalone):
if test.check.clazy_standalone_only and not is_standalone:
return True
......@@ -579,6 +585,11 @@ def run_unit_test(test, is_standalone):
print("Skipping " + test.check.name + " because it is blacklisted for this platform")
return True
if not test.should_run_on_32bit and is32Bit():
if (_verbose):
print("Skipping " + test.check.name + " because it is blacklisted on 32bit")
return True;
checkname = test.check.name
filename = checkname + "/" + test.filename()
......@@ -587,7 +598,7 @@ def run_unit_test(test, is_standalone):
expected_file = filename + ".expected"
# Some tests have different output on 32 bit
if platform.architecture()[0] == '32bit' and os.path.exists(expected_file + '.x86'):
if is32Bit() and os.path.exists(expected_file + '.x86'):
expected_file = expected_file + '.x86'
if is_standalone and test.isScript():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment