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