diff options
author | petermayo@chromium.org <petermayo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-02 14:41:36 +0000 |
---|---|---|
committer | petermayo@chromium.org <petermayo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-02 14:41:36 +0000 |
commit | 69035d06657f16f2c43d85c687f6634284731ae8 (patch) | |
tree | de6ac919fd0ea191ebcb0860475c7cb22186753b /tools/xdisplaycheck | |
parent | 6b9bd63e56bc42b0168023c5db667cf1a9cce271 (diff) | |
download | chromium_src-69035d06657f16f2c43d85c687f6634284731ae8.zip chromium_src-69035d06657f16f2c43d85c687f6634284731ae8.tar.gz chromium_src-69035d06657f16f2c43d85c687f6634284731ae8.tar.bz2 |
Increase timeout for X starting.
Increase logging of what we checked, and how long it took.
BUG=103882
TEST=Run locally.
Review URL: https://chromiumcodereview.appspot.com/9802038
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@130123 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/xdisplaycheck')
-rw-r--r-- | tools/xdisplaycheck/xdisplaycheck.cc | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/tools/xdisplaycheck/xdisplaycheck.cc b/tools/xdisplaycheck/xdisplaycheck.cc index 62fe19c..ba4f26f 100644 --- a/tools/xdisplaycheck/xdisplaycheck.cc +++ b/tools/xdisplaycheck/xdisplaycheck.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // @@ -34,13 +34,14 @@ void Sleep(int duration_ms) { } int main(int argc, char* argv[]) { - int kNumTries = 50; + int kNumTries = 50; // 49*48/2 * 10 = 12.25s of waiting Display* display = NULL; - for (int i = 0; i < kNumTries; ++i) { + int tries; + for (tries = 0; tries < kNumTries; ++tries) { display = XOpenDisplay(NULL); if (display) break; - Sleep(100); + Sleep(10 * tries); } if (!display) { @@ -48,6 +49,8 @@ int main(int argc, char* argv[]) { return -1; } + fprintf(stderr, "Connected after %d retries\n", tries); + #if defined(USE_AURA) // Check for XInput2 int opcode, event, err; @@ -69,6 +72,9 @@ int main(int argc, char* argv[]) { XIDeviceInfo* devices = XIQueryDevice(display, XIAllDevices, &count); if (devices) XIFreeDeviceInfo(devices); + + fprintf(stderr, + "XInput2 verified initially sane on %s.\n", XDisplayName(NULL)); #endif return 0; |