#!/bin/sh -e

pkg=mmmulti

if [ "$AUTOPKGTEST_TMP" = "" ] ; then
  AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
  trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
fi

cd "$AUTOPKGTEST_TMP"

# The mmmulti test utility generates its own random data and writes the
# memory-mapped test files to the current directory.  Run it against the
# multimap, multiset and interval tree implementations.

# multimap (default, padded values)
mmmulti -T test -s 100000 -M 10000 -t 2

# multimap with complex (two-value) records
mmmulti -T test -s 100000 -M 10000 -t 2 -c

# multimap without padding
mmmulti -T test -s 100000 -M 10000 -t 2 -P

# multiset
mmmulti -T test -s 100000 -M 10000 -t 2 -m

# interval tree (keep the value range small so the overlap scan is quick)
mmmulti -T test -s 10000 -M 1000 -t 2 -I
