Update ccapi tests to work at new location in krb5 tree. Also, test for platform...
authorJustin Anderson <jander@mit.edu>
Tue, 25 Sep 2007 21:34:10 +0000 (21:34 +0000)
committerJustin Anderson <jander@mit.edu>
Tue, 25 Sep 2007 21:34:10 +0000 (21:34 +0000)
ticket: 5459

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@19979 dc483132-0cff-0310-8789-dd5450dbe970

src/ccapi/test/Makefile
src/ccapi/test/test_ccapi_ccache.c
src/ccapi/test/test_ccapi_ccache.h
src/ccapi/test/test_ccapi_context.h
src/ccapi/test/test_ccapi_globals.h
src/ccapi/test/test_ccapi_iterators.c
src/ccapi/test/test_ccapi_iterators.h
src/ccapi/test/test_ccapi_util.c
src/ccapi/test/test_ccapi_util.h

index 28d487c0101913f18d1616538ca21b89b7e9fe03..31655f99d84656a9543af994d2daa80c1bcb996f 100644 (file)
@@ -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
index 892f270ba1251d6abb66b7b276180f594841476d..60e2789302b9aae89b5fcbdb60186ce11561755f 100644 (file)
@@ -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"
 
 // ---------------------------------------------------------------------------
 
index c953557053a33404aaea7b2522850173a62859ca..28a4fbabc635cb355f6e678a71d3a26f2d0931f4 100644 (file)
@@ -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);
index 2c7ce1f68d1f46e5dac3230fc5c518e0b669e742..788bd9ea7c60b68f61c39b4830dac324b3da463f 100644 (file)
@@ -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);
index eba364a99ba0b876c256c333b68da3988dae4187..a5c165df2e8e1401ddbdc05be62b5a4712fba20f 100644 (file)
@@ -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;
index 2d02cee95ebf927e350571ca57c66b9b728bffed..e15c7deb258a45bc650f43e2ac8dc13c0071fa81 100644 (file)
@@ -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"
index 77719b940ce877ca266125ec6dfe01f7d2c33db5..d36affa5abf434c350cfa4df812b5454bfa2d8fc 100644 (file)
@@ -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);
index d7dc3e1051a9a89358c510be351e384d6060a269..fde6946fea020cee6cd3c86b12e3995663f77c04 100644 (file)
@@ -3,7 +3,6 @@
 #include <stdio.h>
 #include <stdarg.h>
 #include <stdlib.h>
-#include <krb5.h>
 #include "test_ccapi_util.h"
 
 
index bf8251a1e559e27b64f2bb264b79fb4364312596..4e98e257e2630e04990da78b5086edc5f0cd0031 100644 (file)
@@ -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"