PolicyKit: Branch 'master'
David Zeuthen
david at kemper.freedesktop.org
Sun Nov 11 08:35:34 PST 2007
src/polkit/polkit-config.c | 17 +++++++++++++++++
src/polkit/polkit-context.c | 18 ++++++++++++++++++
src/polkit/polkit-sysdeps.c | 19 ++++++++++++++++++-
src/polkit/polkit-test.c | 3 +++
src/polkit/polkit-test.h | 3 +++
5 files changed, 59 insertions(+), 1 deletion(-)
New commits:
commit bcff1bdea897605950b769bb1353b560e4c13ac8
Author: David Zeuthen <davidz at redhat.com>
Date: Sun Nov 11 11:32:01 2007 -0500
add (empty, for now) tests for remaining files
diff --git a/src/polkit/polkit-config.c b/src/polkit/polkit-config.c
index eaff178..bb8a650 100644
--- a/src/polkit/polkit-config.c
+++ b/src/polkit/polkit-config.c
@@ -47,6 +47,7 @@
#include "polkit-debug.h"
#include "polkit-error.h"
#include "polkit-private.h"
+#include "polkit-test.h"
/**
* SECTION:polkit-config
@@ -771,3 +772,19 @@ polkit_config_determine_admin_auth_type (PolKitConfig *pk_config,
}
}
+#ifdef POLKIT_BUILD_TESTS
+
+static polkit_bool_t
+_run_test (void)
+{
+ return TRUE;
+}
+
+PolKitTest _test_config = {
+ "polkit_config",
+ NULL,
+ NULL,
+ _run_test
+};
+
+#endif /* POLKIT_BUILD_TESTS */
diff --git a/src/polkit/polkit-context.c b/src/polkit/polkit-context.c
index e2559ff..f67e570 100644
--- a/src/polkit/polkit-context.c
+++ b/src/polkit/polkit-context.c
@@ -44,6 +44,7 @@
#include "polkit-context.h"
#include "polkit-policy-cache.h"
#include "polkit-private.h"
+#include "polkit-test.h"
/**
* SECTION:polkit
@@ -801,3 +802,20 @@ polkit_context_get_authorization_db (PolKitContext *pk_context)
{
return pk_context->authdb;
}
+
+#ifdef POLKIT_BUILD_TESTS
+
+static polkit_bool_t
+_run_test (void)
+{
+ return TRUE;
+}
+
+PolKitTest _test_context = {
+ "polkit_context",
+ NULL,
+ NULL,
+ _run_test
+};
+
+#endif /* POLKIT_BUILD_TESTS */
diff --git a/src/polkit/polkit-sysdeps.c b/src/polkit/polkit-sysdeps.c
index 174f85d..63f604d 100644
--- a/src/polkit/polkit-sysdeps.c
+++ b/src/polkit/polkit-sysdeps.c
@@ -40,7 +40,7 @@
#include "polkit-sysdeps.h"
#include "polkit-private.h"
-
+#include "polkit-test.h"
/**
* SECTION:polkit-sysdeps
@@ -159,3 +159,20 @@ polkit_sysdeps_get_exe_for_pid (pid_t pid, char *out_buf, size_t buf_size)
out:
return ret;
}
+
+#ifdef POLKIT_BUILD_TESTS
+
+static polkit_bool_t
+_run_test (void)
+{
+ return TRUE;
+}
+
+PolKitTest _test_sysdeps = {
+ "polkit_sysdeps",
+ NULL,
+ NULL,
+ _run_test
+};
+
+#endif /* POLKIT_BUILD_TESTS */
diff --git a/src/polkit/polkit-test.c b/src/polkit/polkit-test.c
index 5760d66..5ab195e 100644
--- a/src/polkit/polkit-test.c
+++ b/src/polkit/polkit-test.c
@@ -52,6 +52,9 @@ static PolKitTest *tests[] = {
&_test_authorization_constraint,
&_test_authorization,
&_test_authorization_db,
+ &_test_config,
+ &_test_sysdeps,
+ &_test_context,
};
int
diff --git a/src/polkit/polkit-test.h b/src/polkit/polkit-test.h
index 4c1d3a2..e9dfa5c 100644
--- a/src/polkit/polkit-test.h
+++ b/src/polkit/polkit-test.h
@@ -63,6 +63,9 @@ extern PolKitTest _test_policy_cache;
extern PolKitTest _test_authorization_constraint;
extern PolKitTest _test_authorization;
extern PolKitTest _test_authorization_db;
+extern PolKitTest _test_config;
+extern PolKitTest _test_sysdeps;
+extern PolKitTest _test_context;
POLKIT_END_DECLS
More information about the hal-commit
mailing list