1
0
mirror of synced 2026-01-14 15:35:18 +00:00
xen-tools.xen-tools/t/modules.sh
Stéphane Jourdois 3499822e86 Use grep rather than rgrep.
grep -r is really more standard than rgrep, and does the same thing.
chmod modules.t file.
2010-07-26 20:24:37 +02:00

36 lines
650 B
Bash
Executable File

#!/bin/sh
#
# Automatically attempt to create a test which ensures all the modules
# used in the code are availabe.
#
# Steve
# --
# http://www.steve.org.uk/
#
#
cat <<EOF
#!/usr/bin/perl -w -I..
#
# Test that all the Perl modules we require are available.
#
# This list is automatically generated by modules.sh
#
# Steve
# --
#
use Test::More qw( no_plan );
EOF
for i in `grep '^use ' -r .. | grep -v Expect | grep -v POSIX | grep -v Xen:: | grep -v Moose | awk '{print $2}' | tr -d
\;\(\) | sort | uniq`; \
do \
echo "BEGIN{ use_ok( '$i' ); }"; \
echo "require_ok( '$i' );" ; \
printf '\n' ; \
done
chmod 750 modules.t