File: run.sh

package info (click to toggle)
coq 9.1.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 35,968 kB
  • sloc: ml: 239,908; sh: 4,355; python: 2,985; ansic: 2,644; makefile: 874; lisp: 171; javascript: 63; xml: 24; sed: 2
file content (38 lines) | stat: -rw-r--r-- 1,041 bytes parent folder | download
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/bash

. ../template/path-init.sh

rm -rf _test
mkdir _test
find . -maxdepth 1 -not -name . -not -name _test -exec cp -r '{}' -t _test ';'

cd _test || exit 1

# includes 6 file extensions, ignores others such as .c, .vo
# recursive expansion
# explicit non-existent file included
actual=`rocq makefile -sources-of -o CoqMakefile . nonexistent.v`
expected="a/b/g.v a/g.mlg a/g.mllib a/g.mlpack g.ml g.mli nonexistent.v"
if [ "$actual" != "$expected" ]; then
  echo actual: $actual
  echo expected: $expected
  exit 1
fi

# expands specific directory, not ., gets the right subset
actual=`rocq makefile -sources-of -o CoqMakefile a`
expected="a/b/g.v a/g.mlg a/g.mllib a/g.mlpack"
if [ "$actual" != "$expected" ]; then
  echo actual: $actual
  echo expected: $expected
  exit 1
fi

# command line args are in Makefile.conf
rocq makefile -o CoqMakefile . x
actual=`grep "COQMF_CMDLINE_VFILES := . x" CoqMakefile.conf`
if test $? -ne 0; then
  echo bad COQMF_CMDLINE_VFILES:
  grep "COQMF_CMDLINE_VFILES" CoqMakefile.conf
  exit 1
fi