Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F117885488
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/lib/test/run b/lib/test/run
index 6960ab9ec..592f6da3f 100755
--- a/lib/test/run
+++ b/lib/test/run
@@ -1,68 +1,78 @@
#!/usr/bin/perl -w
use strict;
my $verbose = 0;
+my $clean = 0;
while (defined $ARGV[0] && ("-v" eq $ARGV[0])) {
$verbose++;
shift @ARGV;
}
+while (defined $ARGV[0] && ("-c" eq $ARGV[0])) {
+ $clean++;
+ shift @ARGV;
+}
+
my $libs = $ENV{"LIBS"} || "";
sub mysys {
my $cmd = shift;
if ($verbose > 1) {
print "$cmd\n";
}
return system($cmd);
}
sub runone {
my ($t, $p, $d, $tname, $input) = @_;
my $res;
my $output;
$p = "" if (!defined $p);
$d = "" if (!defined $d);
$tname = $t if (!defined $tname);
$input = $t if (!defined $input);
$output = "$input.OUTPUT";
$input = "$input.INPUT";
+ if ($clean) {
+ system "rm -rf $tname";
+ }
+
mkdir $tname, 0755;
chdir $tname;
$res = mysys("gcc $d -g -o $t ../$t.c -L../.. -lcyrus");
if (!$res) {
$res = mysys("./$t $p < ../$input > $t.TEMP");
$res = mysys("cmp -s $t.TEMP ../$output");
}
if ($res) {
print "$tname FAILED\n";
} elsif ($verbose) {
print "$tname ok\n";
}
chdir "..";
}
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_flat -ldb ${libs}");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}", "cyrusdb_skiplist");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_db3 -ldb ${libs}", "cyrusdb_db3");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_flat -ldb ${libs}",
"cyrusdbtxn_flat", "cyrusdbtxn");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}",
"cyrusdbtxn_skiplist", "cyrusdbtxn");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_db3 -ldb ${libs}",
"cyrusdbtxn_db3", "cyrusdbtxn");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_flat -ldb ${libs}",
"cyrusdblong_flat", "cyrusdblong");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}",
"cyrusdblong_skiplist", "cyrusdblong");
runone("cyrusdb", undef, "-DBACKEND=cyrusdb_db3 -ldb ${libs}",
"cyrusdblong_db3", "cyrusdblong");
runone("rnddb", undef, "-DBACKEND=cyrusdb_skiplist -ldb ${libs}",
"rndskip", "rnddb");
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Mon, Apr 6, 2:05 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18831916
Default Alt Text
(2 KB)
Attached To
Mode
R111 cyrus-imapd
Attached
Detach File
Event Timeline