state_dir = default_state_dir if os.environ.get("TEST_INTEGRATION") == "yes": # Get & set state directory if 'TSTATEDIR' in os.environ: state_dir = os.environ['TSTATEDIR'] else: os.environ['TSTATEDIR'] = os.environ.get('TSTATEDIR', default_state_dir) if state_dir and os.path.exists(state_dir): shutil.rmtree(state_dir, ignore_errors=False, onerror=None) if not os.path.exists(state_dir): os.makedirs(state_dir) # Set up logging before starting the GUI setup_gui_logging() core_script_file = os.path.abspath(run_tribler.__file__) core_args = [core_script_file] # QT App initialization app = QApplication(sys.argv) window = TriblerWindow(core_args=core_args) # Wait till the window is shown QTest.qWaitForWindowExposed(window) else: window = None sys.excepthook = sys.__excepthook__ MAX_TIMEOUT = 60000
if os.environ.get("TEST_INTEGRATION") == "yes": # Get & set state directory if os.environ.has_key('TSTATEDIR'): state_dir = os.environ['TSTATEDIR'] else: os.environ['TSTATEDIR'] = os.environ.get('TSTATEDIR', default_state_dir) if state_dir and os.path.exists(state_dir): shutil.rmtree(state_dir, ignore_errors=False, onerror=None) if not os.path.exists(state_dir): os.makedirs(state_dir) # Set up logging before starting the GUI setup_gui_logging() core_script_file = os.path.abspath(run_tribler.__file__) core_args = [core_script_file] # QT App initialization app = QApplication(sys.argv) window = TriblerWindow(core_args=core_args) # Wait till the window is shown QTest.qWaitForWindowExposed(window) else: window = None sys.excepthook = sys.__excepthook__ MAX_TIMEOUT = 60000