Files
mgmt/test/shell/file-source.sh
James Shubin 43839d1090 all: Switch the --lang syntax to use argv instead
It was a bit awkward using `mgmt run lang --lang <input>` so instead, we
now drop the --lang, and read the positional argv for the input.

This also does the same for the --yaml frontend.
2019-05-05 11:10:47 -04:00

25 lines
472 B
Bash
Executable File

#!/bin/bash -e
# vim: noet:ts=8:sts=8:sw=8
. "$(dirname "$0")/../util.sh"
set -x
if ! timeout 1s sudo -A true; then
echo "sudo disabled: not checking file owner and group"
exit
fi
# run till completion
$TIMEOUT sudo -A "$MGMT" run --converged-timeout=5 --no-watch --tmp-prefix 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