1
0
mirror of synced 2026-01-21 01:48:09 +00:00
xen-tools.xen-tools/t/modules.sh
steve eb4a542c4a 2007-09-01 19:23:09 by steve
Moved tests into ./t & updated Makefile to cope with new location.
2007-09-01 19:23:10 +00:00

36 lines
637 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/
#
# $Id: modules.sh,v 1.1 2007-09-01 19:23:10 steve Exp $
#
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 `rgrep '^use ' .. | grep -v Expect | awk '{print $2}' | tr -d
\;\(\) | sort | uniq`; \
do \
echo "BEGIN{ use_ok( '$i' ); }"; \
echo "require_ok( '$i' );" ; \
echo -e "\n" ; \
done