scripts: segfault_test: Don't test harfbuzz if unnecessary

This commit is contained in:
Florian Bruhin 2014-09-18 06:45:09 +02:00
parent a3ff5f7b6e
commit 69d1d130ce

View File

@ -68,40 +68,44 @@ def main():
# pages which previously caused problems # pages which previously caused problems
pages = [ pages = [
# ANGLE, https://bugreports.qt-project.org/browse/QTBUG-39723 # ANGLE, https://bugreports.qt-project.org/browse/QTBUG-39723
'http://www.binpress.com/', ('http://www.binpress.com/', False),
'http://david.li/flow/', ('http://david.li/flow/', False),
'https://imzdl.com/', ('https://imzdl.com/', False),
# not reproducable # not reproducable
# https://bugreports.qt-project.org/browse/QTBUG-39847 # https://bugreports.qt-project.org/browse/QTBUG-39847
'http://www.20min.ch/', ('http://www.20min.ch/', True),
# HarfBuzz, https://bugreports.qt-project.org/browse/QTBUG-39278 # HarfBuzz, https://bugreports.qt-project.org/browse/QTBUG-39278
'http://www.the-compiler.org/', ('http://www.the-compiler.org/', True),
'http://phoronix.com', ('http://phoronix.com', True),
'http://twitter.com', ('http://twitter.com', True),
# HarfBuzz #2, https://bugreports.qt-project.org/browse/QTBUG-36099 # HarfBuzz #2, https://bugreports.qt-project.org/browse/QTBUG-36099
'http://lenta.ru/', ('http://lenta.ru/', True),
# Unknown, https://bugreports.qt-project.org/browse/QTBUG-41360 # Unknown, https://bugreports.qt-project.org/browse/QTBUG-41360
'http://salt.readthedocs.org/en/latest/topics/pillar/' ('http://salt.readthedocs.org/en/latest/topics/pillar/', True),
] ]
else: else:
pages = sys.argv[1:] pages = [(e, True) for e in sys.argv[1:]]
for page in pages: for page, test_harfbuzz in pages:
print("{}==== {} ===={}".format(col.Style.BRIGHT, page, print("{}==== {} ===={}".format(col.Style.BRIGHT, page,
col.Style.NORMAL)) col.Style.NORMAL))
if test_harfbuzz:
print("With system harfbuzz:") print("With system harfbuzz:")
ret = subprocess.call([sys.executable, '-c', SCRIPT, page]) ret = subprocess.call([sys.executable, '-c', SCRIPT, page])
print_ret(ret) print_ret(ret)
retvals.append(ret) retvals.append(ret)
if test_harfbuzz:
print("With QT_HARFBUZZ=old:") print("With QT_HARFBUZZ=old:")
env = dict(os.environ) env = dict(os.environ)
env['QT_HARFBUZZ'] = 'old' env['QT_HARFBUZZ'] = 'old'
ret = subprocess.call([sys.executable, '-c', SCRIPT, page], env=env) ret = subprocess.call([sys.executable, '-c', SCRIPT, page],
env=env)
print_ret(ret) print_ret(ret)
retvals.append(ret) retvals.append(ret)
print("With QT_HARFBUZZ=nev:") print("With QT_HARFBUZZ=new:")
env = dict(os.environ) env = dict(os.environ)
env['QT_HARFBUZZ'] = 'new' env['QT_HARFBUZZ'] = 'new'
ret = subprocess.call([sys.executable, '-c', SCRIPT, page], env=env) ret = subprocess.call([sys.executable, '-c', SCRIPT, page],
env=env)
print_ret(ret) print_ret(ret)
retvals.append(ret) retvals.append(ret)
if all(r == 0 for r in retvals): if all(r == 0 for r in retvals):