ia64/xen-unstable

view tools/check/chk @ 6946:e703abaf6e3d

Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
author emellor@ewan
date Sun Sep 18 14:42:13 2005 +0100 (2005-09-18)
parents 3233e7ecfa9f
children 06d84bf87159
line source
1 #!/bin/bash
3 function usage {
4 echo "Usage:"
5 echo "\t$0 [build|install|clean]"
6 echo
7 echo "Check suitability for Xen build or install."
8 echo "Exit with 0 if OK, 1 if not."
9 echo "Prints only failed tests."
10 echo
11 echo "Calling with 'clean' removes generated files."
12 exit 1
13 }
15 export PATH=${PATH}:/sbin:/usr/sbin
17 case $1 in
18 build)
19 check="CHECK-BUILD"
20 ;;
21 install)
22 check="CHECK-INSTALL"
23 ;;
24 clean)
25 exit 0
26 ;;
27 *)
28 usage
29 ;;
30 esac
32 failed=0
34 echo "Xen ${check} " $(date)
35 for f in check_* ; do
36 case $f in
37 *~)
38 continue
39 ;;
40 *)
41 ;;
42 esac
43 if ! [ -x $f ] ; then
44 continue
45 fi
46 if ! grep -q ${check} $f ; then
47 continue
48 fi
49 echo -n "Checking $f: "
50 if ./$f 2>&1 ; then
51 echo OK
52 else
53 failed=1
54 fi
55 done
57 exit $failed