From d69b83f1464a6326c426f0228bb98c626c7f64bd Mon Sep 17 00:00:00 2001 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 Upstream-Issue: https://github.com/bdellegrazie/lualdap/pull/2 --- Makefile | 3 ++ tests/run-tests.sh | 83 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100755 tests/run-tests.sh diff --git a/Makefile b/Makefile index 72ee348..9bfa542 100644 --- 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..33949c1 --- /dev/null +++ b/tests/run-tests.sh @@ -0,0 +1,83 @@ +#!/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 <