File: test

package info (click to toggle)
ocaml-qcheck 0.91-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,160 kB
  • sloc: ml: 11,771; sh: 46; makefile: 39
file content (34 lines) | stat: -rwxr-xr-x 756 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

set -e

testdir=$(mktemp -d)
trap "rm -rf ${testdir}" 0 INT QUIT ABRT PIPE TERM

cp -r "$(dirname "$0")/../../example" "${testdir}/example"
cp debian/tests/dune-project-examples "${testdir}/example/dune-project"

cd "${testdir}/example"

cat <<'EOF' > qcheck-examples.opam
opam-version: "1.2"
name: "qcheck-examples"
version: "0"
depends: ["qcheck" "oUnit"]
EOF

sed -i 's/package qcheck/package qcheck-examples/' dune
sed -i 's/package qcheck-ounit/package qcheck-examples/' ounit/dune
rm -rf alcotest

for test in QCheck_runner_test.exe ounit/QCheck_ounit_test.exe ounit/QCheck_test.exe
do
	dune build -p qcheck-examples $test

	if [ -x "_build/default/$test" ]; then
		echo "built $test"
	else
		echo "$test does not exist"
		exit 1
	fi
done