Merge lp:~mikemc/ubuntuone-control-panel/fix-1010211-run-tests-on-darwin into lp:ubuntuone-control-panel

Proposed by Mike McCracken
Status: Merged
Approved by: Diego Sarmentero
Approved revision: 331
Merged at revision: 331
Proposed branch: lp:~mikemc/ubuntuone-control-panel/fix-1010211-run-tests-on-darwin
Merge into: lp:ubuntuone-control-panel
Diff against target: 67 lines (+32/-7)
1 file modified
run-tests (+32/-7)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-control-panel/fix-1010211-run-tests-on-darwin
Reviewer Review Type Date Requested Status
Diego Sarmentero (community) Approve
dobey (community) Approve
Review via email: mp+109250@code.launchpad.net

Commit message

- add support for tests on darwin, warn about missing xvfb instead of quiet exit ( LP #1010211 )

Description of the change

- add support for tests on darwin, warn about missing xvfb instead of quiet exit ( LP #1010211 )

Tested on linux, doesn't break anything there.
Also tested on darwin. Works but some tests fail. Not this script's fault!

To post a comment you must log in.
Revision history for this message
dobey (dobey) wrote :

Looks OK to me. Would like to get rid of all the excessive bits in the future (python $u1lint vs just using u1lint, etc type stuff).

review: Approve
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :
Download full text (8.4 KiB)

[ERROR]
Traceback (most recent call last):
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/tests/test_main.py", line 165, in test_all_styles_load
    main.main([sys.argv[0]])
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/__init__.py", line 89, in main
    source.main(app)
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/linux.py", line 22, in main
    from dbus.mainloop.qt import DBusQtMainLoop
exceptions.ImportError: No module named dbus.mainloop.qt

ubuntuone.controlpanel.gui.qt.main.tests.test_main.MainTestCase.test_all_styles_load
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/tests/test_main.py", line 179, in test_installer_option
    main.main([sys.argv[0], "--installer"])
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/__init__.py", line 89, in main
    source.main(app)
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/linux.py", line 22, in main
    from dbus.mainloop.qt import DBusQtMainLoop
exceptions.ImportError: No module named dbus.mainloop.qt

ubuntuone.controlpanel.gui.qt.main.tests.test_main.MainTestCase.test_installer_option
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/tests/test_main.py", line 153, in test_minimized_option
    main.main([sys.argv[0], "--minimized"])
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/__init__.py", line 89, in main
    source.main(app)
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/linux.py", line 22, in main
    from dbus.mainloop.qt import DBusQtMainLoop
exceptions.ImportError: No module named dbus.mainloop.qt

ubuntuone.controlpanel.gui.qt.main.tests.test_main.MainTestCase.test_minimized_option
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/tests/test_main.py", line 185, in test_minimized_with_icon_options
    main.main([sys.argv[0], "--minimized", "--with-icon"])
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/__init__.py", line 89, in main
    source.main(app)
  File "/Users/gatox/canonical/ubuntuone-control-panel-mmcc/ubuntuone/controlpanel/gui/qt/main/linux.py", line 22, in main
    from dbus.mainloop.qt import DBusQtMainLoop
exceptions.ImportError: No module named dbus.mainloop.qt

ubuntuone.controlpanel.gui.qt.main.tests.test_main.MainTestCase.test_minimized_with_icon_options
===============================================================================
[ERROR]
Traceback (most recent call last):
  File "/Users/ga...

Read more...

review: Needs Fixing
Revision history for this message
Diego Sarmentero (diegosarmentero) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'run-tests'
--- run-tests 2012-04-25 13:35:35 +0000
+++ run-tests 2012-06-07 23:06:17 +0000
@@ -19,8 +19,9 @@
19QT_TESTS_PATH="ubuntuone/controlpanel/gui/qt/tests, ubuntuone/controlpanel/gui/qt/main/tests, ubuntuone/controlpanel/gui/qt/uniqueapp/tests"19QT_TESTS_PATH="ubuntuone/controlpanel/gui/qt/tests, ubuntuone/controlpanel/gui/qt/main/tests, ubuntuone/controlpanel/gui/qt/uniqueapp/tests"
20DBUS_TESTS_PATH=ubuntuone/controlpanel/dbustests20DBUS_TESTS_PATH=ubuntuone/controlpanel/dbustests
21WINDOWS_TESTS=test_windows.py21WINDOWS_TESTS=test_windows.py
22LINUX_TESTS=test_linux.py
23DARWIN_TESTS=test_darwin.py
2224
23set -e
2425
25if [ $# -ne 0 ]; then26if [ $# -ne 0 ]; then
26 # run specific module given by the caller27 # run specific module given by the caller
@@ -31,7 +32,7 @@
31fi32fi
3233
33style_check() {34style_check() {
34 u1lint --ignore ubuntuone/controlpanel/gui/qt/ui35 $u1lint --ignore ubuntuone/controlpanel/gui/qt/ui
35 if [ -x `which pep8` ]; then36 if [ -x `which pep8` ]; then
36 pep8 --exclude '.svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py' --repeat . bin/*37 pep8 --exclude '.svn,CVS,.bzr,.hg,.git,*_ui.py,*_rc.py' --repeat . bin/*
37 else38 else
@@ -45,15 +46,39 @@
45 XVFB_CMDLINE="$XVFB -a"46 XVFB_CMDLINE="$XVFB -a"
46fi47fi
4748
49# now fail on errors, after we tried to find xvfb:
50set -e
51
52SYSNAME=`uname -s`
53
54if [ "$SYSNAME" == "Darwin" ]; then
55 u1trial="python $u1trial"
56 u1lint="python $u1lint"
57 IGNORE_FILES="$WINDOWS_TESTS, $LINUX_TESTS"
58 IGNORE_DBUS="-p $DBUS_TESTS_PATH"
59 echo "*** Skipping DBus test suite ***"
60 REACTOR=qt4
61 PYTHONPATH=$PYTHONPATH:../ubuntu-sso-client:../ubuntuone-client:../ubuntuone-storage-protocol:.
62else
63 # Linux:
64 if [ "x$XVFB_CMDLINE" == "x" ]; then
65 echo "WARNING: Could not find xvfb-run, prepare for visual spam."
66 fi
67 u1trial=u1trial
68 u1lint=u1lint
69 IGNORE_FILES="$WINDOWS_TESTS, $DARWIN_TESTS"
70 IGNORE_DBUS=""
71 echo "*** Running DBus test suite ***"
72 $u1trial --reactor=glib "$DBUS_TESTS_PATH"
73 REACTOR=gi
74fi
75
48echo "*** Running test suite for ""$MODULE"" ***"76echo "*** Running test suite for ""$MODULE"" ***"
49u1trial --reactor=gi -p "$DBUS_TESTS_PATH, $QT_TESTS_PATH" -i "$WINDOWS_TESTS" "$MODULE"77$u1trial --reactor=$REACTOR -p "$DBUS_TESTS_PATH, $QT_TESTS_PATH" -i "$IGNORE_FILES" "$MODULE"
50
51echo "*** Running DBus test suite ***"
52u1trial --reactor=glib "$DBUS_TESTS_PATH"
5378
54echo "*** Running QT test suite for ""$MODULE"" ***"79echo "*** Running QT test suite for ""$MODULE"" ***"
55./setup.py build80./setup.py build
56$XVFB_CMDLINE u1trial -i "$WINDOWS_TESTS" --reactor=qt4 --gui "$MODULE"81$XVFB_CMDLINE $u1trial $IGNORE_DBUS -i "$IGNORE_FILES" --reactor=qt4 --gui "$MODULE"
57rm -rf _trial_temp82rm -rf _trial_temp
58rm -rf build83rm -rf build
5984

Subscribers

People subscribed via source and target branches