Files
mgmt/test/shell/file-source.sh
James Shubin ccad6e7e1a test: Enable and fix up some more tests
An unstable engine probably masked some of these issues.
2019-02-24 12:28:59 -05:00

23 lines
470 B
Bash
Executable File

#!/bin/bash -e
# vim: noet:ts=8:sts=8:sw=8
set -x
if ! timeout 1s sudo -A true; then
echo "sudo disabled: not checking file owner and group"
exit
fi
# run till completion
$timeout --kill-after=360s 300s sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix lang --lang file-source.mcl &
pid=$!
wait $pid # get exit status
e=$?
ls -l /tmp/mgmt
test -e /tmp/mgmt/file-source.txt
cmp --silent file-source.txt /tmp/mgmt/file-source.txt || exit 1
exit $e