aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/coq-makefile/plugin-reach-outside-API-and-fail/run.sh
blob: 88606cd473dc9c6776c42271949a1f4a0349e2d6 (plain)
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
35
36
37
38
#!/usr/bin/env bash

set -e

git clean -dfx

cat > _CoqProject <<EOT
-I src/

./src/test_plugin.mllib
./src/test.ml4
./src/test.mli
EOT

mkdir src

cat > src/test_plugin.mllib <<EOT
Test
EOT

touch src/test.mli

cat > src/test.ml4 <<EOT
DECLARE PLUGIN "test"

let _ = Pre_env.empty_env
EOT

${COQBIN}coq_makefile -f _CoqProject -o Makefile
cat Makefile.conf

if make VERBOSE=1; then
  # make command should have failed (but didn't)
  exit 1
else
  # make command should have failed (and it indeed did)
  exit 0
fi