summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2013-03-04 16:37:04 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-03-19 21:47:30 +0100
commit6569d57e3bc168e6e83d70333b48c5cb43aa04c4 (patch)
treeb6a21e44f6ba22018e686cd7454b77658f7fef7b
parent6837eee3f7f81c0ee454d3718d67d7f3cc6b48ef (diff)
downloadsssd-6569d57e3bc168e6e83d70333b48c5cb43aa04c4.tar.gz
sssd-6569d57e3bc168e6e83d70333b48c5cb43aa04c4.tar.bz2
sssd-6569d57e3bc168e6e83d70333b48c5cb43aa04c4.zip
Do not compile main() in DP if UNIT_TESTING is defined
The simple access provider unit tests now need to link against the Data Provider when they start using the be_file_account_request() function. But then we would start having conflicts as at least the main() functions would clash. If UNIT_TESTING is defined, then the data_provider_be.c module does not contain the main() function and can be linked against directly from another module that contains its own main() function
-rw-r--r--src/providers/data_provider_be.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/providers/data_provider_be.c b/src/providers/data_provider_be.c
index 32548b6b..df077b24 100644
--- a/src/providers/data_provider_be.c
+++ b/src/providers/data_provider_be.c
@@ -2686,6 +2686,7 @@ fail:
return ret;
}
+#ifndef UNIT_TESTING
int main(int argc, const char *argv[])
{
int opt;
@@ -2766,6 +2767,7 @@ int main(int argc, const char *argv[])
return 0;
}
+#endif
static int data_provider_res_init(DBusMessage *message,
struct sbus_connection *conn)