1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
From 987f84c13bac6032164616b220289b5824bbd6a2 Mon Sep 17 00:00:00 2001
From: Stef Walter <stef@memberwebs.com>
Date: Wed, 19 Jan 2011 19:44:39 +0000
Subject: Remove unneeded test file.
---
diff --git a/library/tests/Makefile.am b/library/tests/Makefile.am
index 9514c47..0a54cc7 100644
--- a/library/tests/Makefile.am
+++ b/library/tests/Makefile.am
@@ -2,16 +2,12 @@
TEST_AUTO = \
test-memory.c \
test-keyrings.c \
- test-other.c \
- test-daemon-setup.c
+ test-other.c
TEST_LIBS = \
$(top_builddir)/egg/libegg.la \
$(top_builddir)/library/libgnome-keyring.la
-TEST_FLAGS = \
- -DTEST_WITH_DAEMON
-
include $(top_srcdir)/tests/gtest.make
# ------------------------------------------------------------------
diff --git a/library/tests/test-daemon-setup.c b/library/tests/test-daemon-setup.c
deleted file mode 100644
index 077656d..0000000
--- a/library/tests/test-daemon-setup.c
+++ b/dev/null
@@ -1,86 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-/* unit-test-daemon-setup.c: Start a gnome-keyring-daemon process for testing
-
- Copyright (C) 2007 Stefan Walter
-
- The Gnome Keyring Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The Gnome Keyring Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the Gnome Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
-
- Author: Stef Walter <stef@memberwebs.com>
-*/
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <signal.h>
-#include <unistd.h>
-
-#include "run-auto-test.h"
-
-#include "library/gnome-keyring.h"
-
-#if 0
-static GPid daemon_pid;
-#endif
-
-DEFINE_START(setup_daemon)
-{
-#if 0
- GError *err = NULL;
- gchar *args[3];
- const gchar *outside, *path;
- gboolean start = FALSE;
- gchar *socket;
-
- /* If already setup somewhere else, then don't start daemon here */
- outside = g_getenv ("GNOME_KEYRING_OUTSIDE_TEST");
- if (!outside || !outside[0])
- start = TRUE;
-
- path = g_getenv ("GNOME_KEYRING_TEST_PATH");
- g_assert (path && path[0]);
-
- socket = g_strdup_printf ("%s/socket", path);
- g_setenv ("GNOME_KEYRING_SOCKET", socket, TRUE);
-
- if (!start)
- return;
-
- g_printerr ("Starting gnome-keyring-daemon...\n");
-
- args[0] = "../../daemon/gnome-keyring-daemon";
- args[1] = "-f";
- args[2] = NULL;
-
- if (!g_spawn_async (NULL, args, NULL, G_SPAWN_LEAVE_DESCRIPTORS_OPEN | G_SPAWN_DO_NOT_REAP_CHILD,
- NULL, NULL, &daemon_pid, &err)) {
- g_error ("couldn't start gnome-keyring-daemon for testing: %s",
- err && err->message ? err->message : "");
- g_assert_not_reached ();
- }
-
- /* Let it startup properly */
- sleep (2);
-#endif
-}
-
-DEFINE_STOP(setup_daemon)
-{
-#if 0
- if (daemon_pid)
- kill (daemon_pid, SIGTERM);
- /* We're exiting soon anyway, no need to wait */
-#endif
-}
--
cgit v0.9.0.2
|