From: Dan Callaghan Date: Mon, 30 Jun 2014 11:27:56 +1000 Subject: [PATCH] Add script to run test.lua against a dummy slapd Ported from https://src.fedoraproject.org/cgit/rpms/lua-ldap.git/tree/0002-script-to-run-test.lua-against-a-dummy-slapd.patch --- a/Makefile +++ b/Makefile @@ -26,3 +26,6 @@ install: src/$(LIBNAME) clean: rm -f $(OBJS) src/$(LIBNAME) + +check: + LUA_CPATH="src/?.so.$V" sh tests/run-tests.sh diff --git a/tests/run-tests.sh b/tests/run-tests.sh new file mode 100755 index 0000000..f3cafd0 --- /dev/null +++ b/tests/run-tests.sh @@ -0,0 +1,80 @@ +#!/bin/sh +set -ex + +d=$(readlink -f "$(dirname $0)") +password=thepassword + +rm -rf "$d/slapd-config" "$d/slapd-data" +mkdir "$d/slapd-config" "$d/slapd-data" + +# populate slapd config +slapadd -F "$d/slapd-config" -n0 <