Wrap t_stringattr in a very minimal Python test script so that libkdb5
can find the DB2 module to allocate memory.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25223
dc483132-0cff-0310-8789-
dd5450dbe970
install-unix:: install-libs
clean-unix:: clean-liblinks clean-libs clean-libobjs
$(RM) adb_err.c adb_err.h t_stringattr.o t_stringattr
-check-unix:: t_stringattr
- KRB5_CONFIG=$(top_srcdir)/config-files/krb5.conf; export KRB5_CONFIG; \
- $(RUN_SETUP) $(VALGRIND) ./t_stringattr
+
+check-pytests:: t_stringattr
+ $(RUNPYTEST) $(srcdir)/t_stringattr.py $(PYTESTFLAGS)
generate-files-mac: darwin.exports
char *val;
int count;
- assert(krb5_init_context(&context) == 0);
+ assert(krb5int_init_context_kdc(&context) == 0);
/* Start with an empty entry. */
ent = krb5_db_alloc(context, NULL, sizeof(*ent));
- if (ent == NULL)
- return ENOMEM;
+ if (ent == NULL) {
+ fprintf(stderr, "Can't allocate memory for entry.\n");
+ return 1;
+ }
memset(ent, 0, sizeof(*ent));
/* Check that the entry has no strings to start. */
--- /dev/null
+#!/usr/bin/python
+from k5test import *
+
+realm = K5Realm(create_kdb=False)
+realm.run_as_master(['./t_stringattr'])
+success('String attribute unit tests.')