Merge lp:~3v1n0/indicator-datetime/calendar-data-files into lp:indicator-datetime

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Andrea Azzarone
Approved revision: 488
Merged at revision: 488
Proposed branch: lp:~3v1n0/indicator-datetime/calendar-data-files
Merge into: lp:indicator-datetime
Prerequisite: lp:~azzar1/indicator-datetime/drop-dep-from-ubuntu-app-launch
Diff against target: 63 lines (+18/-1)
3 files modified
tests/CMakeLists.txt (+3/-1)
tests/data/applications/org.gnome.Calendar.desktop (+13/-0)
tests/run-eds-ics-test.sh (+2/-0)
To merge this branch: bzr merge lp:~3v1n0/indicator-datetime/calendar-data-files
Reviewer Review Type Date Requested Status
Andrea Azzarone (community) Approve
unity-api-1-bot continuous-integration Needs Fixing
Review via email: mp+328864@code.launchpad.net

Commit message

tests: add fake calendar desktop and icon files so that they can be used at testing time

To post a comment you must log in.
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
unity-api-1-bot (unity-api-1-bot) wrote :
review: Needs Fixing (continuous-integration)
488. By Marco Trevisan (Treviño)

tests: add fake calendar desktop and icon files so that they can be used for testing

Revision history for this message
Andrea Azzarone (azzar1) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tests/CMakeLists.txt'
2--- tests/CMakeLists.txt 2017-02-10 16:15:07 +0000
3+++ tests/CMakeLists.txt 2017-08-16 14:06:24 +0000
4@@ -40,6 +40,7 @@
5 set (COVERAGE_TEST_TARGETS ${COVERAGE_TEST_TARGETS} ${TEST_NAME} PARENT_SCOPE)
6 add_executable (${TEST_NAME} ${TEST_NAME}.cpp gschemas.compiled)
7 add_test (${TEST_NAME} ${TEST_NAME})
8+ set_tests_properties(${TEST_NAME} PROPERTIES ENVIRONMENT "XDG_DATA_DIRS=${CMAKE_CURRENT_SOURCE_DIR}/data:/usr/share")
9 target_link_libraries (${TEST_NAME} indicatordatetimeservice ${DBUSTEST_LIBRARIES} ${SERVICE_DEPS_LIBRARIES} ${GTEST_LIBRARIES} ${GMOCK_LIBRARIES})
10 endfunction()
11 add_test_by_name(test-datetime)
12@@ -86,7 +87,8 @@
13 ${TEST_NAME} # arg3: test name
14 ${CMAKE_CURRENT_SOURCE_DIR}/test-eds-ics-config-files # arg4: base directory for config file template
15 ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME}.ics # arg5: the ical file for this test
16- ${CMAKE_CURRENT_SOURCE_DIR}/accounts.db) # arg6: online accounts database
17+ ${CMAKE_CURRENT_SOURCE_DIR}/accounts.db # arg6: online accounts database
18+ ${CMAKE_CURRENT_SOURCE_DIR}/data) # arg7: data dir
19 endfunction()
20 add_eds_ics_test_by_name(test-eds-ics-all-day-events)
21 add_eds_ics_test_by_name(test-eds-ics-repeating-events)
22
23=== added directory 'tests/data'
24=== added directory 'tests/data/applications'
25=== added file 'tests/data/applications/org.gnome.Calendar.desktop'
26--- tests/data/applications/org.gnome.Calendar.desktop 1970-01-01 00:00:00 +0000
27+++ tests/data/applications/org.gnome.Calendar.desktop 2017-08-16 14:06:24 +0000
28@@ -0,0 +1,13 @@
29+[Desktop Entry]
30+Name=Calendar
31+Comment=Access, and manage calendar
32+Exec=/bin/true
33+Icon=org.gnome.Calendar
34+Terminal=false
35+Type=Application
36+StartupNotify=true
37+Categories=GNOME;GTK;Office;Calendar;Core;
38+Keywords=Calendar;Event;Reminder;
39+MimeType=text/calendar;
40+DBusActivatable=true
41+X-Ubuntu-Gettext-Domain=gnome-calendar
42
43=== added directory 'tests/data/icons'
44=== added file 'tests/data/icons/org.gnome.Calendar.png'
45Binary files tests/data/icons/org.gnome.Calendar.png 1970-01-01 00:00:00 +0000 and tests/data/icons/org.gnome.Calendar.png 2017-08-16 14:06:24 +0000 differ
46=== modified file 'tests/run-eds-ics-test.sh'
47--- tests/run-eds-ics-test.sh 2016-05-14 02:07:10 +0000
48+++ tests/run-eds-ics-test.sh 2017-08-16 14:06:24 +0000
49@@ -7,6 +7,7 @@
50 CONFIG_DIR=$4 # config files
51 ICS_FILE=$5 # ical file holding test data
52 ACCOUNTS_DB=$6 # online account database
53+DATA_DIR=$7 # data dir
54
55 echo "this script: ${SELF}"
56 echo "test-runner: ${TEST_RUNNER}"
57@@ -34,6 +35,7 @@
58 export XDG_PUBLICSHARE_DIR=${TEST_TMP_DIR}
59 export XDG_TEMPLATES_DIR=${TEST_TMP_DIR}
60 export XDG_VIDEOS_DIR=${TEST_TMP_DIR}
61+export XDG_DATA_DIRS=$(dirname ${TEST_EXEC}):${DATA_DIR}:/usr/share
62 export QORGANIZER_EDS_DEBUG=On
63 export GIO_USE_VFS=local # needed to ensure GVFS shuts down cleanly after the test is over
64

Subscribers

People subscribed via source and target branches