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
|
#!/usr/bin/env bash
# test that murphi2xml can parse a basic model
if [ -z "${AUTOPKGTEST_TMP}" ]; then
printf 'AUTOPKGTEST_TMP not set; not running in autopkgtest?\n' >&2
exit 1
fi
set -e
set -x
# move to temporary directory
mkdir -p ${AUTOPKGTEST_TMP}/murphi2xml-model
cd ${AUTOPKGTEST_TMP}/murphi2xml-model
# construct a simple model
cat - >model.m <<EOT
var
x: boolean;
startstate begin
x := true;
end;
rule begin
x := !x;
end;
EOT
# parse the model
murphi2xml --output /dev/null model.m
|