Merge lp:~aacid/unity-2d/unity-2d-shell-shaped_bring_back_launcher_tests into lp:~unity-2d-team/unity-2d/unity-2d-shell-shaped

Proposed by Albert Astals Cid
Status: Rejected
Rejected by: Michał Sawicz
Proposed branch: lp:~aacid/unity-2d/unity-2d-shell-shaped_bring_back_launcher_tests
Merge into: lp:~unity-2d-team/unity-2d/unity-2d-shell-shaped
Diff against target: 93 lines (+72/-0)
3 files modified
shell/CMakeLists.txt (+1/-0)
shell/tests/CMakeLists.txt (+29/-0)
shell/tests/launcherviewtest.cpp (+42/-0)
To merge this branch: bzr merge lp:~aacid/unity-2d/unity-2d-shell-shaped_bring_back_launcher_tests
Reviewer Review Type Date Requested Status
Michał Sawicz Abstain
Ugo Riboni Pending
Review via email: mp+88661@code.launchpad.net

Description of the change

bring back launcher/tests as shell/tests

To post a comment you must log in.
917. By Albert Astals Cid

merge

Revision history for this message
Michał Sawicz (saviq) wrote :

Lets do that against unity-2d-shell (non-shaped).

review: Abstain

Unmerged revisions

917. By Albert Astals Cid

merge

916. By Albert Astals Cid

bring back launcher/tests as shell/tests

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'shell/CMakeLists.txt'
2--- shell/CMakeLists.txt 2011-12-02 16:12:19 +0000
3+++ shell/CMakeLists.txt 2012-01-17 11:08:26 +0000
4@@ -2,6 +2,7 @@
5
6 # Source
7 add_subdirectory(app)
8+add_subdirectory(tests)
9
10 file(GLOB shell_QML *.qml *.js)
11
12
13=== added directory 'shell/tests'
14=== added file 'shell/tests/CMakeLists.txt'
15--- shell/tests/CMakeLists.txt 1970-01-01 00:00:00 +0000
16+++ shell/tests/CMakeLists.txt 2012-01-17 11:08:26 +0000
17@@ -0,0 +1,29 @@
18+macro(launcher_tests)
19+ set(_test_list "")
20+ foreach(_test ${ARGN})
21+ add_test(NAME ${_test}
22+ COMMAND /bin/bash ${CMAKE_SOURCE_DIR}/tests/misc/run-with-xvfb.sh ./${_test}
23+ )
24+ add_executable(${_test} ${_test}.cpp ${_test}.moc)
25+ qt4_generate_moc(${_test}.cpp ${_test}.moc)
26+ target_link_libraries(${_test}
27+ ${QT_QTTEST_LIBRARIES}
28+ uqlauncher
29+ )
30+ set(_test_list "${_test_list};${_test}")
31+ endforeach(_test)
32+endmacro(launcher_tests)
33+
34+include_directories(
35+ ${CMAKE_SOURCE_DIR}/tests
36+ ${CMAKE_CURRENT_SOURCE_DIR}/../app
37+ ${CMAKE_CURRENT_BINARY_DIR}
38+ ${QT_QTTEST_INCLUDE_DIR}
39+ ${QTGCONF_INCLUDE_DIRS}
40+ )
41+
42+launcher_tests(
43+# FIXME: test need a mock dbus object to message with via dbus-test-runner
44+# launcherviewtest
45+ )
46+
47
48=== added file 'shell/tests/launcherviewtest.cpp'
49--- shell/tests/launcherviewtest.cpp 1970-01-01 00:00:00 +0000
50+++ shell/tests/launcherviewtest.cpp 2012-01-17 11:08:26 +0000
51@@ -0,0 +1,42 @@
52+/*
53+ * This file is part of unity-2d
54+ *
55+ * Copyright 2010 Canonical Ltd.
56+ *
57+ * Authors:
58+ * - Aurélien Gâteau <aurelien.gateau@canonical.com>
59+ *
60+ * This program is free software; you can redistribute it and/or modify
61+ * it under the terms of the GNU General Public License as published by
62+ * the Free Software Foundation; version 3.
63+ *
64+ * This program is distributed in the hope that it will be useful,
65+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
66+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
67+ * GNU General Public License for more details.
68+ *
69+ * You should have received a copy of the GNU General Public License
70+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
71+ */
72+
73+// Local
74+#include <unitytestmacro.h>
75+#include <launcherview.h>
76+
77+// Qt
78+#include <QtTestGui>
79+
80+class LauncherViewTest : public QObject
81+{
82+ Q_OBJECT
83+private Q_SLOTS:
84+ void testCreate()
85+ {
86+ LauncherView view;
87+ }
88+};
89+
90+QAPP_TEST_MAIN(LauncherViewTest)
91+
92+#include "launcherviewtest.moc"
93+

Subscribers

People subscribed via source and target branches