summaryrefslogtreecommitdiff
path: root/ubi-utils/tests/runtests.pl
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-05-04 21:00:46 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2007-05-04 21:00:46 +0300
commit80cecea79cf13075d136e73067aa40439539bb0f (patch)
treef28acc5b3a124c3a7355f77ccdbad48753f55872 /ubi-utils/tests/runtests.pl
parent726ac243f051f0daee6149db66ac21ba621fb454 (diff)
parent22f90673165489fd50c893a91051a79c1b143d2a (diff)
Merge branch 'ubi'
Diffstat (limited to 'ubi-utils/tests/runtests.pl')
-rwxr-xr-xubi-utils/tests/runtests.pl30
1 files changed, 30 insertions, 0 deletions
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 <UBI device 1> <UBI device 2> ...\n";
+}