~ubuntu-branches/ubuntu/saucy/indicator-appmenu/saucy-updates

« back to all changes in this revision

Viewing changes to tests/Makefile.am

  • Committer: Package Import Robot
  • Author(s): Automatic PS uploader, Mathieu Trudel-Lapierre, Automatic PS uploader
  • Date: 2013-02-20 09:41:54 UTC
  • mfrom: (1.1.40)
  • Revision ID: package-import@ubuntu.com-20130220094154-zrxsx0vgay436wyt
Tags: 13.01.0daily13.02.20-0ubuntu1
[ Mathieu Trudel-Lapierre ]
* Artificially bump upstream major version to please hud.

[ Automatic PS uploader ]
* Automatic snapshot from revision 234

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
DISTCLEANFILES =
2
 
EXTRA_DIST =
3
 
 
4
 
TESTS =
5
 
check_PROGRAMS =
6
 
XFAIL_TESTS =
7
 
 
8
 
DBUS_RUNNER=dbus-test-runner
9
 
XVFB_RUN=". $(srcdir)/run-xvfb.sh"
10
 
 
11
 
EXTRA_DIST += \
12
 
        run-xvfb.sh
13
1
 
14
2
SUBDIRS = \
15
3
        manual
16
 
 
17
 
######################
18
 
# Test Distance
19
 
######################
20
 
 
21
 
TESTS += \
22
 
        test-distance-test
23
 
 
24
 
check_PROGRAMS += \
25
 
        test-distance
26
 
 
27
 
DISTANCE_XML_REPORT = test-distance.xml
28
 
 
29
 
test-distance-test: test-distance Makefile.am
30
 
        @echo "#!/bin/bash" > $@
31
 
        @echo $(XVFB_RUN) >> $@
32
 
        @echo gtester --verbose -k -o $(DISTANCE_XML_REPORT) $(builddir)/test-distance >> $@
33
 
        @chmod +x $@
34
 
 
35
 
test_distance_SOURCES = \
36
 
        test-distance.c
37
 
 
38
 
test_distance_CFLAGS = \
39
 
        $(HUD_CFLAGS) \
40
 
        $(COVERAGE_CFLAGS) \
41
 
        -I$(top_srcdir)/src \
42
 
        -I$(top_builddir)/src \
43
 
        -Wall -Werror
44
 
 
45
 
test_distance_LDADD = \
46
 
        ../src/libhud-service.a         \
47
 
        $(HUD_LIBS)
48
 
 
49
 
DISTCLEANFILES += $(DISTANCE_XML_REPORT)
50
 
 
51
 
######################
52
 
# Test Result Highlighting
53
 
######################
54
 
 
55
 
TESTS += \
56
 
        test-result-highlighting-test
57
 
 
58
 
check_PROGRAMS += \
59
 
        test-result-highlighting
60
 
 
61
 
DISTANCE_XML_REPORT = test-result-highlighting.xml
62
 
 
63
 
test-result-highlighting-test: test-result-highlighting Makefile.am
64
 
        @echo "#!/bin/bash" > $@
65
 
        @echo $(XVFB_RUN) >> $@
66
 
        @echo gtester --verbose -k -o $(DISTANCE_XML_REPORT) $(builddir)/test-result-highlighting >> $@
67
 
        @chmod +x $@
68
 
 
69
 
test_result_highlighting_SOURCES = \
70
 
        test-result-highlighting.c
71
 
 
72
 
test_result_highlighting_CFLAGS = \
73
 
        $(HUD_CFLAGS) \
74
 
        $(COVERAGE_CFLAGS) \
75
 
        -I$(top_srcdir)/src \
76
 
        -I$(top_builddir)/src \
77
 
        -Wall -Werror
78
 
 
79
 
test_result_highlighting_LDADD = \
80
 
        ../src/libhud-service.a         \
81
 
        $(HUD_LIBS)
82
 
 
83
 
DISTCLEANFILES += $(DISTANCE_XML_REPORT)
84
 
 
85
 
######################
86
 
# Test Usage DB Simple
87
 
######################
88
 
 
89
 
TESTS += \
90
 
        test-usage-db-simple-test
91
 
 
92
 
check_PROGRAMS += \
93
 
        test-usage-db-simple
94
 
 
95
 
USAGE_DB_SIMPLE_XML_REPORT = test-usage-db-simple.xml
96
 
 
97
 
test-usage-db-simple-test: test-usage-db-simple test-usage-db-simple.sql Makefile.am
98
 
        @echo "#!/bin/bash -e" > $@
99
 
        @echo cd \`mktemp -d $(abs_builddir)/test-usage-db-simple.dir.XXXXXX\` >> $@
100
 
        @echo mkdir -p indicator-appmenu >> $@
101
 
        @echo cat $(abs_srcdir)/test-usage-db-simple.sql \| sqlite3 indicator-appmenu/hud-usage-log.sqlite >> $@
102
 
        @echo export HUD_CACHE_DIR=\`pwd\` >> $@
103
 
        @echo export GSETTINGS_BACKEND=memory >> $@
104
 
        @echo export GSETTINGS_SCHEMA_DIR=\`pwd\` >> $@
105
 
        @echo gtester --verbose -k -o $(abs_builddir)/$(USAGE_DB_SIMPLE_XML_REPORT) $(abs_builddir)/test-usage-db-simple >> $@
106
 
        @echo cd .. >> $@
107
 
        @echo rm -rf test-usage-db-simple.dir.\* >> $@
108
 
        @chmod +x $@
109
 
 
110
 
test_usage_db_simple_SOURCES = \
111
 
        test-usage-db-simple.c
112
 
 
113
 
test_usage_db_simple_CFLAGS = \
114
 
        $(HUD_CFLAGS) \
115
 
        $(COVERAGE_CFLAGS) \
116
 
        -DDATADIR=\""$(datadir)"\" \
117
 
        -I$(top_srcdir)/src \
118
 
        -I$(top_builddir)/src \
119
 
        -Wall -Werror
120
 
 
121
 
test_usage_db_simple_LDADD = \
122
 
        ../src/libhud-service.a         \
123
 
        $(HUD_LIBS)
124
 
 
125
 
DISTCLEANFILES += $(USAGE_DB_SIMPLE_XML_REPORT)
126
 
EXTRA_DIST += test-usage-db-simple.sql
127
 
 
128
 
######################
129
 
# Test Usage DB Old
130
 
######################
131
 
 
132
 
TESTS += \
133
 
        test-usage-db-old-test
134
 
 
135
 
check_PROGRAMS += \
136
 
        test-usage-db-old
137
 
 
138
 
USAGE_DB_OLD_XML_REPORT = test-usage-db-old.xml
139
 
 
140
 
test-usage-db-old-test: test-usage-db-old test-usage-db-old.sql Makefile.am
141
 
        @echo "#!/bin/bash -e" > $@
142
 
        @echo cd \`mktemp -d $(abs_builddir)/test-usage-db-old.dir.XXXXXX\` >> $@
143
 
        @echo mkdir -p indicator-appmenu >> $@
144
 
        @echo cat $(abs_srcdir)/test-usage-db-old.sql \| sqlite3 indicator-appmenu/hud-usage-log.sqlite >> $@
145
 
        @echo export HUD_CACHE_DIR=\`pwd\` >> $@
146
 
        @echo export GSETTINGS_BACKEND=memory >> $@
147
 
        @echo export GSETTINGS_SCHEMA_DIR=\`pwd\` >> $@
148
 
        @echo gtester --verbose -k -o $(abs_builddir)/$(USAGE_DB_SIMPLE_XML_REPORT) $(abs_builddir)/test-usage-db-old >> $@
149
 
        @echo cd .. >> $@
150
 
        @echo rm -rf test-usage-db-old.dir.\* >> $@
151
 
        @chmod +x $@
152
 
 
153
 
test_usage_db_old_SOURCES = \
154
 
        test-usage-db-old.c
155
 
 
156
 
test_usage_db_old_CFLAGS = \
157
 
        $(HUD_CFLAGS) \
158
 
        $(COVERAGE_CFLAGS) \
159
 
        -DDATADIR=\""$(datadir)"\" \
160
 
        -I$(top_srcdir)/src \
161
 
        -I$(top_builddir)/src \
162
 
        -Wall -Werror
163
 
 
164
 
test_usage_db_old_LDADD = \
165
 
        ../src/libhud-service.a         \
166
 
        $(HUD_LIBS)
167
 
 
168
 
DISTCLEANFILES += $(USAGE_DB_OLD_XML_REPORT)
169
 
EXTRA_DIST += test-usage-db-old.sql
170
 
 
171
 
#######################
172
 
# Test Usage DB Ancient
173
 
#######################
174
 
 
175
 
TESTS += \
176
 
        test-usage-db-ancient-test
177
 
 
178
 
check_PROGRAMS += \
179
 
        test-usage-db-ancient
180
 
 
181
 
test-usage-db-ancient-test: test-usage-db-ancient test-usage-db-ancient.sql test-usage-dump-entries.sql Makefile.am
182
 
        @echo "#!/bin/bash -e" > $@
183
 
        @echo cd \`mktemp -d $(abs_builddir)/test-usage-db-ancient.dir.XXXXXX\` >> $@
184
 
        @echo mkdir -p indicator-appmenu >> $@
185
 
        @echo cat $(abs_srcdir)/test-usage-db-ancient.sql \| sqlite3 indicator-appmenu/hud-usage-log.sqlite >> $@
186
 
        @echo export HUD_CACHE_DIR=\`pwd\` >> $@
187
 
        @echo export GSETTINGS_BACKEND=memory >> $@
188
 
        @echo export GSETTINGS_SCHEMA_DIR=\`pwd\` >> $@
189
 
        @echo $(abs_builddir)/test-usage-db-ancient >> $@
190
 
        @echo if test \`cat $(abs_srcdir)/test-usage-dump-entries.sql \| sqlite3 indicator-appmenu/hud-usage-log.sqlite \| wc -l\` -gt 0\; then >> $@
191
 
        @echo echo Database has entries >> $@
192
 
        @echo exit 1 >> $@
193
 
        @echo fi >> $@
194
 
        @echo cd .. >> $@
195
 
        @echo rm -rf test-usage-db-ancient.dir.\* >> $@
196
 
        @chmod +x $@
197
 
 
198
 
test_usage_db_ancient_SOURCES = \
199
 
        test-usage-db-ancient.c
200
 
 
201
 
test_usage_db_ancient_CFLAGS = \
202
 
        $(HUD_CFLAGS) \
203
 
        $(COVERAGE_CFLAGS) \
204
 
        -DDATADIR=\""$(datadir)"\" \
205
 
        -I$(top_srcdir)/src \
206
 
        -I$(top_builddir)/src \
207
 
        -Wall -Werror
208
 
 
209
 
test_usage_db_ancient_LDADD = \
210
 
        ../src/libhud-service.a         \
211
 
        $(HUD_LIBS)
212
 
 
213
 
EXTRA_DIST += \
214
 
        test-usage-db-ancient.sql \
215
 
        test-usage-dump-entries.sql
216
 
 
217
 
#######################
218
 
# Test Usage DB Testapp
219
 
#######################
220
 
 
221
 
TESTS += \
222
 
        test-usage-db-testapp-test
223
 
 
224
 
check_PROGRAMS += \
225
 
        test-usage-db-testapp
226
 
 
227
 
USAGE_TESTAPP_XML_REPORT = test-usage-db-testapp.xml
228
 
 
229
 
test-usage-db-testapp-test: test-usage-db-testapp good-app-info/testapp.desktop.hud-app-info good-app-info/testapp100.desktop.hud-app-info $(top_srcdir)/src/create-db.sql Makefile.am
230
 
        @echo "#!/bin/bash -e" > $@
231
 
        @echo cd \`mktemp -d $(abs_builddir)/test-usage-db-testapp.dir.XXXXXX\` >> $@
232
 
        @echo mkdir -p indicator-appmenu >> $@
233
 
        @echo cat $(abs_top_srcdir)/src/create-db.sql \| sqlite3 indicator-appmenu/hud-usage-log.sqlite >> $@
234
 
        @echo export HUD_CACHE_DIR=\`pwd\` >> $@
235
 
        @echo export HUD_APP_INFO_DIR=$(abs_srcdir)/good-app-info >> $@
236
 
        @echo export GSETTINGS_BACKEND=memory >> $@
237
 
        @echo export GSETTINGS_SCHEMA_DIR=\`pwd\` >> $@
238
 
        @echo gtester --verbose -k -o $(abs_builddir)/$(USAGE_TESTAPP_XML_REPORT) $(abs_builddir)/test-usage-db-testapp >> $@
239
 
        @echo cd .. >> $@
240
 
        @echo rm -rf test-usage-db-testapp.dir.\* >> $@
241
 
        @chmod +x $@
242
 
 
243
 
test_usage_db_testapp_SOURCES = \
244
 
        test-usage-db-testapp.c
245
 
 
246
 
test_usage_db_testapp_CFLAGS = \
247
 
        $(HUD_CFLAGS) \
248
 
        $(COVERAGE_CFLAGS) \
249
 
        -DDATADIR=\""$(datadir)"\" \
250
 
        -I$(top_srcdir)/src \
251
 
        -I$(top_builddir)/src \
252
 
        -Wall -Werror
253
 
 
254
 
test_usage_db_testapp_LDADD = \
255
 
        ../src/libhud-service.a         \
256
 
        $(HUD_LIBS)
257
 
 
258
 
EXTRA_DIST += \
259
 
        good-app-info/testapp100.desktop.hud-app-info \
260
 
        good-app-info/testapp.desktop.hud-app-info
261
 
 
262
 
DISTCLEANFILES += $(USAGE_TESTAPP_XML_REPORT)
263
 
 
264
 
######################
265
 
# Test Usage DB Off
266
 
######################
267
 
 
268
 
TESTS += \
269
 
        test-usage-db-off-test
270
 
 
271
 
USAGE_OFF_XML_REPORT = $(abs_builddir)/test-usage-db-off.xml
272
 
 
273
 
test-usage-db-off-test: test-usage-db-testapp good-app-info/testapp.desktop.hud-app-info good-app-info/testapp100.desktop.hud-app-info Makefile.am
274
 
        @echo "#!/bin/bash -e" > $@
275
 
        @echo cd \`mktemp -d $(abs_builddir)/test-usage-db-off.dir.XXXXXX\` >> $@
276
 
        @echo mkdir -p indicator-appmenu >> $@
277
 
        @echo export HUD_CACHE_DIR=\`pwd\` >> $@
278
 
        @echo export HUD_APP_INFO_DIR=$(abs_srcdir)/good-app-info >> $@
279
 
        @echo export HUD_NO_STORE_USAGE_DATA=1 >> $@
280
 
        @echo export GSETTINGS_BACKEND=memory >> $@
281
 
        @echo export GSETTINGS_SCHEMA_DIR=\`pwd\` >> $@
282
 
        @echo gtester --verbose -k -o $(abs_buildir)/$(USAGE_OFF_XML_REPORT) $(abs_builddir)/test-usage-db-testapp >> $@
283
 
        @echo test \! -e indicator-appmenu/hud-usage-log.sqlite >> $@
284
 
        @echo cd .. >> $@
285
 
        @echo rm -rf test-usage-db-off.dir.\* >> $@
286
 
        @chmod +x $@
287
 
 
288
 
DISTCLEANFILES += $(USAGE_OFF_XML_REPORT)
289
 
 
290
 
#########################
291
 
# Test Bad App Info
292
 
#########################
293
 
 
294
 
TESTS += \
295
 
        test-bad-app-info-dual-header \
296
 
        test-bad-app-info-item-no-count \
297
 
        test-bad-app-info-item-no-name \
298
 
        test-bad-app-info-menu-no-name \
299
 
        test-bad-app-info-missing-desktop \
300
 
        test-bad-app-info-missing-menus \
301
 
        test-bad-app-info-multiple-menus
302
 
 
303
 
test-bad-app-info-dual-header: bad-app-info/dual-headers.hud-app-info test-bad-app-info Makefile.am
304
 
        @echo "#!/bin/bash -e" > $@
305
 
        @echo $(builddir)/test-bad-app-info $(srcdir)/bad-app-info/dual-headers.hud-app-info >> $@
306
 
        @chmod +x $@
307
 
 
308
 
test-bad-app-info-item-no-count: bad-app-info/item-no-count.hud-app-info test-bad-app-info Makefile.am
309
 
        @echo "#!/bin/bash -e" > $@
310
 
        @echo $(builddir)/test-bad-app-info $(srcdir)/bad-app-info/item-no-count.hud-app-info >> $@
311
 
        @chmod +x $@
312
 
 
313
 
test-bad-app-info-item-no-name: bad-app-info/item-no-name.hud-app-info test-bad-app-info Makefile.am
314
 
        @echo "#!/bin/bash -e" > $@
315
 
        @echo $(builddir)/test-bad-app-info $(srcdir)/bad-app-info/item-no-name.hud-app-info >> $@
316
 
        @chmod +x $@
317
 
 
318
 
test-bad-app-info-menu-no-name: bad-app-info/menu-no-name.hud-app-info test-bad-app-info Makefile.am
319
 
        @echo "#!/bin/bash -e" > $@
320
 
        @echo $(builddir)/test-bad-app-info $(srcdir)/bad-app-info/menu-no-name.hud-app-info >> $@
321
 
        @chmod +x $@
322
 
 
323
 
test-bad-app-info-missing-menus: bad-app-info/missing-menus.hud-app-info test-bad-app-info Makefile.am
324
 
        @echo "#!/bin/bash -e" > $@
325
 
        @echo $(builddir)/test-bad-app-info $(srcdir)/bad-app-info/missing-menus.hud-app-info >> $@
326
 
        @chmod +x $@
327
 
 
328
 
test-bad-app-info-missing-desktop: bad-app-info/missing-desktop.hud-app-info test-bad-app-info Makefile.am
329
 
        @echo "#!/bin/bash -e" > $@
330
 
        @echo $(builddir)/test-bad-app-info $(srcdir)/bad-app-info/missing-desktop.hud-app-info >> $@
331
 
        @chmod +x $@
332
 
 
333
 
test-bad-app-info-multiple-menus: bad-app-info/multiple-menus.hud-app-info test-bad-app-info Makefile.am
334
 
        @echo "#!/bin/bash -e" > $@
335
 
        @echo $(builddir)/test-bad-app-info $(srcdir)/bad-app-info/multiple-menus.hud-app-info >> $@
336
 
        @chmod +x $@
337
 
 
338
 
EXTRA_DIST += \
339
 
        bad-app-info/dual-headers.hud-app-info \
340
 
        bad-app-info/item-no-count.hud-app-info \
341
 
        bad-app-info/item-no-name.hud-app-info \
342
 
        bad-app-info/menu-no-name.hud-app-info \
343
 
        bad-app-info/missing-desktop.hud-app-info \
344
 
        bad-app-info/missing-menus.hud-app-info \
345
 
        bad-app-info/multiple-menus.hud-app-info
346
 
 
347
 
check_PROGRAMS += \
348
 
        test-bad-app-info
349
 
 
350
 
test_bad_app_info_SOURCES = \
351
 
        test-bad-app-info.c
352
 
 
353
 
test_bad_app_info_CFLAGS = \
354
 
        $(HUD_CFLAGS) \
355
 
        $(COVERAGE_CFLAGS) \
356
 
        -I$(top_srcdir)/src \
357
 
        -I$(top_builddir)/src \
358
 
        -Wall -Werror
359
 
 
360
 
test_bad_app_info_LDADD = \
361
 
        ../src/libhud-service.a         \
362
 
        $(HUD_LIBS)
363
 
 
364
 
#########################
365
 
# Test Good App Info
366
 
#########################
367
 
 
368
 
TESTS += \
369
 
        test-good-app-info-tons-of-entries
370
 
 
371
 
check_PROGRAMS += \
372
 
        test-load-app-info
373
 
 
374
 
test_load_app_info_SOURCES = \
375
 
        test-load-app-info.c
376
 
 
377
 
test_load_app_info_CFLAGS = \
378
 
        $(HUD_CFLAGS) \
379
 
        $(COVERAGE_CFLAGS) \
380
 
        -I$(top_srcdir)/src \
381
 
        -I$(top_builddir)/src \
382
 
        -Wall -Werror
383
 
 
384
 
test_load_app_info_LDADD = \
385
 
        ../src/libhud-service.a         \
386
 
        $(HUD_LIBS)
387
 
 
388
 
test-good-app-info-tons-of-entries: good-app-info/tons-of-entries.hud-app-info test-load-app-info test-usage-dump-entries.sql Makefile.am
389
 
        @echo "#!/bin/bash -e" > $@
390
 
        @echo cd \`mktemp -d $(abs_builddir)/test-good-app-info-tons-of-entries.dir.XXXXXX\` >> $@
391
 
        @echo mkdir -p indicator-appmenu >> $@
392
 
        @echo $(abs_builddir)/test-load-app-info indicator-appmenu/hud-usage-log.sqlite $(abs_srcdir)/good-app-info/tons-of-entries.hud-app-info >> $@
393
 
        @echo export HUD_CACHE_DIR=\`pwd\` >> $@
394
 
        @echo if test \`cat $(abs_srcdir)/test-usage-dump-entries.sql \| sqlite3 indicator-appmenu/hud-usage-log.sqlite \| wc -l\` -ne 540\; then >> $@
395
 
        @echo echo Database has wrong number of entries >> $@
396
 
        @echo exit 1 >> $@
397
 
        @echo fi >> $@
398
 
        @echo cd .. >> $@
399
 
        @echo rm -rf test-good-app-info-tons-of-entries.dir.\* >> $@
400
 
        @chmod +x $@
401
 
 
402
 
EXTRA_DIST += \
403
 
        good-app-info/tons-of-entries.hud-app-info \
404
 
        test-usage-dump-entries.sql
405
 
 
406
 
#########################
407
 
# Test Dbus Messages
408
 
#########################
409
 
 
410
 
TESTS += \
411
 
        test-dbus-message-count
412
 
 
413
 
test-dbus-message-count: test-dbus-message-count.in
414
 
        @sed \
415
 
                -e "s|\@top_builddir\@|$(top_builddir)|" \
416
 
                -e "s|\@builddir\@|$(builddir)|" \
417
 
                -e "s|\@srcdir\@|$(srcdir)|" \
418
 
                $< > $@
419
 
        @chmod +x $@
420
 
 
421
 
EXTRA_DIST += \
422
 
        test-dbus-message-count-send-query \
423
 
        test-dbus-message-count.in \
424
 
        test-dbus-message-count.json
425
 
 
426
 
DISTCLEANFILES += test-dbus-message-count.bustle
427
 
 
428
 
###################
429
 
# Test Performance
430
 
###################
431
 
 
432
 
check_PROGRAMS += \
433
 
        hud-performance
434
 
 
435
 
hud_performance_CFLAGS = \
436
 
        -I$(top_builddir)/src           \
437
 
        -I$(top_srcdir)/src             \
438
 
        $(HUD_CFLAGS)
439
 
hud_performance_LDADD = \
440
 
        ../src/libhud-service.a         \
441
 
        $(HUD_LIBS)
442
 
hud_performance_SOURCES = \
443
 
        hud-performance.c       \
444
 
        word-list.h
445
 
 
446
 
#########################
447
 
# Footer
448
 
#########################
449
 
 
450
 
DISTCLEANFILES += $(TESTS)