From 22f90673165489fd50c893a91051a79c1b143d2a Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Wed, 21 Mar 2007 11:55:30 +0200 Subject: UBI-Utils: Add Artem's test programs Signed-off-by: Adrian Hunter --- ubi-utils/tests/runtests.pl | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 ubi-utils/tests/runtests.pl (limited to 'ubi-utils/tests/runtests.pl') diff --git a/ubi-utils/tests/runtests.pl b/ubi-utils/tests/runtests.pl new file mode 100755 index 0000000..8005716 --- /dev/null +++ b/ubi-utils/tests/runtests.pl @@ -0,0 +1,30 @@ +#!/usr/bin/perl -w + +sub usage; + +my @tests = ("mkvol_basic", "mkvol_bad", "mkvol_paral", "rsvol", + "io_basic", "io_read", "io_update", "io_paral"); + +if (not defined @ARGV) { + usage(); + exit; +} + +foreach (@ARGV) { + -c or die "Error: $_ is not character device\n"; +} + +my $dev; +foreach $dev (@ARGV) { + foreach (@tests) { + print "Running: $_ $dev"; + system "./$_ $dev" and die; + print "\tSUCCESS\n"; + } +} + +sub usage +{ + print "Usage:\n"; + print "$0 ...\n"; +} -- cgit v1.2.3