diff options
author | Justin Anderson <jander@mit.edu> | 2007-09-25 21:34:10 +0000 |
---|---|---|
committer | Justin Anderson <jander@mit.edu> | 2007-09-25 21:34:10 +0000 |
commit | 403149c8eee2e85c168c365528d9a6443a237fba (patch) | |
tree | eb0b7d9f1175b799245a3b09e04c6359d771a773 /src | |
parent | 0c9671a9f8dc5d0efb2638952089fb2b6b78838a (diff) | |
download | krb5-403149c8eee2e85c168c365528d9a6443a237fba.zip krb5-403149c8eee2e85c168c365528d9a6443a237fba.tar.gz krb5-403149c8eee2e85c168c365528d9a6443a237fba.tar.bz2 |
Update ccapi tests to work at new location in krb5 tree. Also, test for platform when compiling so that KfM and KfW can use this
ticket: 5459
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19979 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r-- | src/ccapi/test/Makefile | 4 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_ccache.c | 2 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_ccache.h | 3 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_context.h | 2 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_globals.h | 8 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_iterators.c | 3 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_iterators.h | 2 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_util.c | 1 | ||||
-rw-r--r-- | src/ccapi/test/test_ccapi_util.h | 1 |
9 files changed, 14 insertions, 12 deletions
diff --git a/src/ccapi/test/Makefile b/src/ccapi/test/Makefile index 28d487c..31655f9 100644 --- a/src/ccapi/test/Makefile +++ b/src/ccapi/test/Makefile @@ -29,7 +29,7 @@ build-base: $(OBJECTS) build-tests: $(TEST_OBJECTS) # rule to compile files in src directory -$(OBJDIR)/%.o: $(SRCDIR)/%.c +$(OBJDIR)/%.o: %.c $(CC) -c -o $@ $< # Make a build directory @@ -46,7 +46,7 @@ $(TEST_NAMES): $(TEST_OBJECTS) $(CC) -o $(TESTDIR)/$@ $(OBJDIR)/$@.o $(OBJECTS) $(LIBS) copy-script: - cp $(SRCDIR)/$(SCRIPT_NAME) $(DSTDIR)/$(SCRIPT_NAME) + cp $(SCRIPT_NAME) $(DSTDIR)/$(SCRIPT_NAME) success-message: @echo diff --git a/src/ccapi/test/test_ccapi_ccache.c b/src/ccapi/test/test_ccapi_ccache.c index 892f270..60e2789 100644 --- a/src/ccapi/test/test_ccapi_ccache.c +++ b/src/ccapi/test/test_ccapi_ccache.c @@ -1,4 +1,3 @@ -#include "test_ccapi_ccache.h" #include <string.h> #include <stdlib.h> @@ -7,6 +6,7 @@ #include "test_ccapi_check.h" #include "test_ccapi_util.h" #include "test_ccapi_context.h" +#include "test_ccapi_ccache.h" // --------------------------------------------------------------------------- diff --git a/src/ccapi/test/test_ccapi_ccache.h b/src/ccapi/test/test_ccapi_ccache.h index c953557..28a4fba 100644 --- a/src/ccapi/test/test_ccapi_ccache.h +++ b/src/ccapi/test/test_ccapi_ccache.h @@ -1,8 +1,7 @@ #ifndef _TEST_CCAPI_CCACHE_H_ #define _TEST_CCAPI_CCACHE_H_ -#include <CredentialsCache.h> - +#include "test_ccapi_globals.h" int check_cc_ccache_release(); cc_int32 check_once_cc_ccache_release(cc_context_t context, cc_ccache_t ccache, cc_int32 expected_err, const char *description); diff --git a/src/ccapi/test/test_ccapi_context.h b/src/ccapi/test/test_ccapi_context.h index 2c7ce1f..788bd9e 100644 --- a/src/ccapi/test/test_ccapi_context.h +++ b/src/ccapi/test/test_ccapi_context.h @@ -1,7 +1,7 @@ #ifndef _TEST_CCAPI_CONTEXT_H_ #define _TEST_CCAPI_CONTEXT_H_ -#include <CredentialsCache.h> +#include "test_ccapi_globals.h" int check_cc_initialize(); cc_int32 check_once_cc_initialize(cc_context_t *out_context, cc_int32 in_version, cc_int32 *out_supported_version, char const **out_vendor, cc_int32 expected_err, const char *description); diff --git a/src/ccapi/test/test_ccapi_globals.h b/src/ccapi/test/test_ccapi_globals.h index eba364a..a5c165d 100644 --- a/src/ccapi/test/test_ccapi_globals.h +++ b/src/ccapi/test/test_ccapi_globals.h @@ -1,7 +1,13 @@ #ifndef _TEST_CCAPI_GLOBALS_H_ #define _TEST_CCAPI_GLOBALS_H_ -#include "CredentialsCache.h" +#include <krb5.h> // gets us TARGET_OS_MAC + +#ifdef TARGET_OS_MAC +#include <Kerberos/CredentialsCache.h> +#else +#include <CredentialsCache.h> +#endif /* GLOBALS */ extern unsigned int total_failure_count; diff --git a/src/ccapi/test/test_ccapi_iterators.c b/src/ccapi/test/test_ccapi_iterators.c index 2d02cee..e15c7de 100644 --- a/src/ccapi/test/test_ccapi_iterators.c +++ b/src/ccapi/test/test_ccapi_iterators.c @@ -1,5 +1,4 @@ -#include "CredentialsCache.h" - +#include "test_ccapi_globals.h" #include "test_ccapi_iterators.h" #include "test_ccapi_check.h" #include "test_ccapi_util.h" diff --git a/src/ccapi/test/test_ccapi_iterators.h b/src/ccapi/test/test_ccapi_iterators.h index 77719b9..d36affa 100644 --- a/src/ccapi/test/test_ccapi_iterators.h +++ b/src/ccapi/test/test_ccapi_iterators.h @@ -1,7 +1,7 @@ #ifndef _TEST_CCAPI_ITERATORS_H_ #define _TEST_CCAPI_ITERATORS_H_ -#include <CredentialsCache.h> +#include "test_ccapi_globals.h" int check_cc_ccache_iterator_next(); cc_int32 check_once_cc_ccache_iterator_next(cc_ccache_iterator_t iterator, cc_uint32 expected_count, cc_int32 expected_err, const char *description); diff --git a/src/ccapi/test/test_ccapi_util.c b/src/ccapi/test/test_ccapi_util.c index d7dc3e1..fde6946 100644 --- a/src/ccapi/test/test_ccapi_util.c +++ b/src/ccapi/test/test_ccapi_util.c @@ -3,7 +3,6 @@ #include <stdio.h> #include <stdarg.h> #include <stdlib.h> -#include <krb5.h> #include "test_ccapi_util.h" diff --git a/src/ccapi/test/test_ccapi_util.h b/src/ccapi/test/test_ccapi_util.h index bf8251a..4e98e25 100644 --- a/src/ccapi/test/test_ccapi_util.h +++ b/src/ccapi/test/test_ccapi_util.h @@ -1,7 +1,6 @@ #ifndef _TEST_CCAPI_UTIL_H_ #define _TEST_CCAPI_UTIL_H_ -#include <CredentialsCache.h> #include "test_ccapi_globals.h" #include "test_ccapi_log.h" |