1
0
mirror of synced 2026-01-13 15:17:30 +00:00
xen-tools.xen-tools/t/modules.sh
2016-08-11 21:35:41 +02:00

34 lines
597 B
Bash
Executable File

#!/bin/sh
#
# Automatically attempt to create a test which ensures all the modules
# used in the code are available.
#
# Steve
# --
# https://steve.fi/
#
#
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 .. | egrep -v '^\./\.git/|Expect|POSIX|Xen::' | awk '{print $2}' | tr -d '\r;()' | sort -u`; \
do \
echo "BEGIN{ use_ok( '$i' ); }"; \
echo "require_ok( '$i' );" ; \
printf '\n' ; \
done