Code

integration tests: Run all invocations through valgrind's memcheck.
[sysdb.git] / t / integration / simple_query.sh
index 37c57a1b4221387404ce2ddb9002cfc1a70e8adf..76b54d66e840f8333b51bebaff7ec2eb64fc7cbf 100755 (executable)
@@ -33,7 +33,7 @@ set -e
 
 source "$( dirname "$0" )/test_lib.sh"
 
-cat <<EOF > "$TESTDIR/sysdbd.conf"
+cat <<EOF > "$SYSDBD_CONF"
 Listen "$SOCKET_FILE"
 PluginDir "$PLUGIN_DIR"
 Interval 2
@@ -43,16 +43,19 @@ LoadBackend mock_plugin
 </Backend>
 EOF
 
-"$TOP_SRCDIR/src/sysdbd" -D -C "$TESTDIR/sysdbd.conf" &
+$SYSDBD -D -C "$SYSDBD_CONF" &
 sysdbd_pid=$!
 
 wait_for_sysdbd
 sleep 3
 
-"$TOP_SRCDIR/src/sysdb" -H "$SOCKET_FILE" -c LIST \
+output="$( $SYSDB -H "$SOCKET_FILE" -c LIST )"
+echo "$output" \
        | grep -F '"host1.example.com"' \
        | grep -F "host2.example.com" \
        | grep -F "localhost" \
        | grep -F "other.host.name" \
        | grep -F "some.host.name"
-kill $!
+kill $sysdbd_pid
+wait $sysdbd_pid
+