mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
58 lines
923 B
Bash
Executable File
58 lines
923 B
Bash
Executable File
#!/bin/bash
|
|
|
|
function usage {
|
|
echo "Usage:"
|
|
echo "\t$0 [build|install|clean]"
|
|
echo
|
|
echo "Check suitability for Xen build or install."
|
|
echo "Exit with 0 if OK, 1 if not."
|
|
echo "Prints only failed tests."
|
|
echo
|
|
echo "Calling with 'clean' removes generated files."
|
|
exit 1
|
|
}
|
|
|
|
export PATH=${PATH}:/sbin:/usr/sbin
|
|
|
|
case $1 in
|
|
build)
|
|
check="CHECK-BUILD"
|
|
;;
|
|
install)
|
|
check="CHECK-INSTALL"
|
|
;;
|
|
clean)
|
|
exit 0
|
|
;;
|
|
*)
|
|
usage
|
|
;;
|
|
esac
|
|
|
|
failed=0
|
|
|
|
echo "Xen ${check} " $(date)
|
|
for f in check_* ; do
|
|
case $f in
|
|
*~)
|
|
continue
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
if ! [ -x $f ] ; then
|
|
continue
|
|
fi
|
|
if ! grep -q ${check} $f ; then
|
|
continue
|
|
fi
|
|
echo -n "Checking $f: "
|
|
if ./$f 2>&1 ; then
|
|
echo OK
|
|
else
|
|
failed=1
|
|
fi
|
|
done
|
|
|
|
exit $failed
|