summaryrefslogtreecommitdiff
path: root/ubi-utils/tests/runtests.pl
blob: 800571658b4019bef4cd0f29af01affe24ccc572 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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";
}