16001 gui test suite broken again
authorBrock Pytlik <bpytlik@sun.com>
Thu, 20 May 2010 21:07:51 -0700
changeset 1907 a6564f3c8f3d
parent 1906 3815c42300a6
child 1908 4bdaf0463bae
16001 gui test suite broken again
src/tests/run.py
--- a/src/tests/run.py	Thu May 20 08:56:02 2010 -0700
+++ b/src/tests/run.py	Thu May 20 21:07:51 2010 -0700
@@ -20,8 +20,9 @@
 # CDDL HEADER END
 #
 
-# Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
-# Use is subject to license terms.
+#
+# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
+#
 
 import os
 import sys
@@ -296,16 +297,21 @@
         suites.append(api_suite)
         if ostype == "posix":
                 suites.append(cli_suite)
-                import gui.testutils
-                if not gui.testutils.check_for_gtk():
-                        print "# GTK not present or $DISPLAY not " \
-                            "set, GUI tests disabled."
-                elif not gui.testutils.check_if_a11y_enabled():
-                        print "# Accessibility not enabled, GUI tests disabled."
+                try:
+                        import gui.testutils
+                except Exception, e:
+                        print "# %s" % e
                 else:
-                        gui_suite = find_tests("gui", onlyval,
-                            startattest, output)
-                        suites.append(gui_suite)
+                        if not gui.testutils.check_for_gtk():
+                                print "# GTK not present or $DISPLAY not " \
+                                    "set, GUI tests disabled."
+                        elif not gui.testutils.check_if_a11y_enabled():
+                                print "# Accessibility not enabled, GUI " \
+                                    "tests disabled."
+                        else:
+                                gui_suite = find_tests("gui", onlyval,
+                                    startattest, output)
+                                suites.append(gui_suite)
 
         # This is primarily of interest to developers altering the test suite,
         # so don't enable it for now.  The testsuite suite tends to emit a bunch