Commit b15be077 authored by Benjamin Berg's avatar Benjamin Berg
Browse files

Move datetime tests into tests subdirectory

parent 3c76d52e
......@@ -183,33 +183,14 @@ cflags += [
'-DGNOMELOCALEDIR="@0@"'.format(control_center_localedir)
]
panels_libs += static_library(
datetime_panel_lib = static_library(
cappletname,
sources: sources + resources,
include_directories: [ top_inc, common_inc ],
dependencies: deps,
c_args: cflags
)
test_cflags = '-DSRCDIR="@0@"'.format(meson.current_source_dir())
test_units = [
#['test-timezone', ['cc-timezone-map.c', 'tz.c'] + resources, [m_dep], []],
['test-timezone-gfx', ['tz.c'] + resources, [m_dep], [test_cflags]],
['test-endianess', ['date-endian.c'], [], []]
]
foreach unit: test_units
exe = executable(
unit[0],
[unit[0] + '.c'] + unit[1],
include_directories: top_inc,
dependencies: deps + unit[2],
c_args: cflags + unit[3]
)
test(unit[0], exe)
endforeach
panels_libs += datetime_panel_lib
subdir('po-timezones')
subdir('icons')
test_units = [
#'test-timezone',
'test-timezone-gfx',
'test-endianess',
]
includes = [top_inc, include_directories('../../panels/datetime')]
cflags = [
'-DTEST_SRCDIR="@0@"'.format(meson.current_source_dir()),
'-DSRCDIR="@0@"'.format(meson.source_root() + '/panels/datetime')
]
foreach unit: test_units
exe = executable(
unit,
[unit + '.c'],
include_directories: includes,
dependencies: common_deps + [m_dep],
link_with: [datetime_panel_lib],
c_args: cflags
)
test(unit, exe)
endforeach
#include <config.h>
#include <locale.h>
#include "cc-datetime-resources.h"
#include "tz.h"
static void
......@@ -46,6 +47,8 @@ int main (int argc, char **argv)
g_setenv ("G_DEBUG", "fatal_warnings", FALSE);
g_resources_register (cc_datetime_get_resource ());
if (argc == 2) {
pixmap_dir = g_strdup (argv[1]);
} else if (argc == 1) {
......
#include <locale.h>
#include <gtk/gtk.h>
#include "cc-datetime-resources.h"
#include "cc-timezone-map.h"
#define TZ_DIR "/usr/share/zoneinfo/"
......@@ -100,6 +101,8 @@ int main (int argc, char **argv)
gtk_init (NULL, NULL);
g_test_init (&argc, &argv, NULL);
g_resources_register (cc_datetime_get_resource ());
g_setenv ("G_DEBUG", "fatal_warnings", FALSE);
g_test_add_func ("/datetime/timezone", test_timezone);
......
subdir('common')
subdir('datetime')
subdir('printers')
subdir('info')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment