зеркало из https://github.com/mozilla/gecko-dev.git
use the Peristence module so that we can test the storable
implementation.
This commit is contained in:
Родитель
e297628504
Коммит
e26cd9b686
|
@ -5,8 +5,8 @@
|
|||
# current time.
|
||||
|
||||
|
||||
# $Revision: 1.3 $
|
||||
# $Date: 2000/11/09 19:14:31 $
|
||||
# $Revision: 1.4 $
|
||||
# $Date: 2000/11/28 17:53:06 $
|
||||
# $Author: kestes%staff.mail.com $
|
||||
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/test/genbugs.tst,v $
|
||||
# $Name: $
|
||||
|
@ -47,6 +47,7 @@ use lib '#tinder_libdir#';
|
|||
use TinderConfig;
|
||||
use Utils;
|
||||
use HTMLPopUp;
|
||||
use Persistence;
|
||||
|
||||
# since this is a test we do not want to use TinderConfig.pm to get
|
||||
# information about our configuration. Our test needs to be self
|
||||
|
@ -143,35 +144,41 @@ foreach $tree (@TREES) {
|
|||
|
||||
my ($pretty_time) = HTMLPopUp::timeHTML($timenow);
|
||||
|
||||
$out = <<EOF;
|
||||
\$r = {
|
||||
'ReportedBy' => 'kestes\@staff.mail.com',
|
||||
'Bug#' => $bug_id,
|
||||
'Product' => '$tree',
|
||||
'Priority' => 'low',
|
||||
'Status' => '$status',
|
||||
'Platform' => 'All',
|
||||
'Version' => '1.0',
|
||||
'Summary' => '$summary',
|
||||
'Component' => 'rhcn',
|
||||
'Severity' => 'low',
|
||||
'QAContact' => 'matty\@box.net.au',
|
||||
|
||||
'tinderbox_timenow' => $timenow,
|
||||
'tinderbox_status' => '$status',
|
||||
'tinderbox_bug_id' => $bug_id,
|
||||
'tinderbox_bug_url' => 'http://bugzilla.mozilla.org/show_bug.cgi?id=$bug_id',
|
||||
'tinderbox_tree' => '$tree',
|
||||
}
|
||||
|
||||
EOF
|
||||
;
|
||||
my (%data) = (
|
||||
'ReportedBy' => "kestes\@staff.mail.com",
|
||||
'Bug#' => $bug_id,
|
||||
'Product' => "$tree",
|
||||
'Priority' => "low",
|
||||
'Status' => '$status',
|
||||
'Platform' => "All",
|
||||
'Version' => "1.0",
|
||||
'Summary' => '$summary',
|
||||
'Component' => "rhcn",
|
||||
'Severity' => "low",
|
||||
'QAContact' => "matty\@box.net.au",
|
||||
|
||||
'tinderbox_timenow' => $timenow,
|
||||
'tinderbox_status' => '$status',
|
||||
'tinderbox_bug_id' => $bug_id,
|
||||
'tinderbox_bug_url' => "http://bugzilla.mozilla.org/show_bug.cgi?id=$bug_id",
|
||||
'tinderbox_tree' => "$tree",
|
||||
);
|
||||
|
||||
open(FILE, ">$TINDERBOX_DATA_DIR/$tree/db/BT.Update.$timenow.$bug_id");
|
||||
my ($update_file) = ("$TINDERBOX_DATA_DIR/$tree/db/".
|
||||
"BT.Update.$timenow.$bug_id");
|
||||
|
||||
print FILE $out;
|
||||
# first we try and make the file name leagal, then we check by using
|
||||
# the definiative legal filename checker.
|
||||
|
||||
$update_file =~ s/\@/\./g;
|
||||
$update_file = main::extract_filename_chars($update_file);
|
||||
|
||||
|
||||
close(FILE);
|
||||
Persistence::save_structure(
|
||||
\%data,
|
||||
$update_file,
|
||||
);
|
||||
|
||||
|
||||
} # foreach $j
|
||||
} # foreach $i
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
# URL.
|
||||
|
||||
|
||||
# $Revision: 1.10 $
|
||||
# $Date: 2000/11/28 00:23:16 $
|
||||
# $Revision: 1.11 $
|
||||
# $Date: 2000/11/28 17:53:24 $
|
||||
# $Author: kestes%staff.mail.com $
|
||||
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/test/genbuilds.tst,v $
|
||||
# $Name: $
|
||||
|
@ -46,6 +46,7 @@ use lib '#tinder_libdir#';
|
|||
use TinderConfig;
|
||||
use Utils;
|
||||
use HTMLPopUp;
|
||||
use Persistence;
|
||||
|
||||
|
||||
# since this is a test we do not want to use TinderConfig.pm to get
|
||||
|
@ -215,27 +216,24 @@ sub write_update_record {
|
|||
my ($local_starttime) = localtime($begin);
|
||||
my ($local_endtime) = localtime($end);
|
||||
|
||||
my ($data) = <<EOF;
|
||||
|
||||
\$r = {
|
||||
'tree' => '$tree',
|
||||
'buildname' => '$build',
|
||||
'buildfamily' => 'unix',
|
||||
'status' => '$status',
|
||||
'starttime' => '$begin',
|
||||
my (%data) = (
|
||||
|
||||
'tree' => $tree,
|
||||
'buildname' => $build,
|
||||
'status' => $status,
|
||||
'starttime' => $begin,
|
||||
# starttime: '$local_starttime', endtime: '$local_endtime', buildname: '$build',
|
||||
'timenow' => '$end',
|
||||
'timenow' => $end,
|
||||
|
||||
# this link does not point to real log files, it is only to help give
|
||||
# an idea of what the real link will look like and acts as a comment to make debugging easier.
|
||||
|
||||
'brieflog' => 'http://www.mozilla.org/tree=$tree/buildname=$build/starttime=$starttime/status=$status',
|
||||
'errorparser' => 'unix'
|
||||
};
|
||||
EOF
|
||||
;
|
||||
'brieflog' => "http://www.mozilla.org/tree=$tree/buildname=$build/starttime=$starttime/status=$status",
|
||||
'errorparser' => "unix",
|
||||
);
|
||||
|
||||
|
||||
|
||||
my ($update_file) = ("$TINDERBOX_DATA_DIR/$tree/db/".
|
||||
"Build.Update.$tree.$build.$begin");
|
||||
|
||||
|
@ -246,14 +244,10 @@ EOF
|
|||
mkdir_R("$TINDERBOX_DATA_DIR/$tree/db", 0777);
|
||||
mkdir_R("$TINDERBOX_DATA_DIR/$tree/h", 0777);
|
||||
|
||||
open(FILE, ">$update_file") ||
|
||||
die("Could not open file: $update_file : $! \n");
|
||||
|
||||
print FILE $data;
|
||||
|
||||
close(FILE) ||
|
||||
die("Could not close file: $update_file : $! \n");
|
||||
|
||||
Persistence::save_structure(
|
||||
\%data,
|
||||
$update_file,
|
||||
);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
# current time.
|
||||
|
||||
|
||||
# $Revision: 1.7 $
|
||||
# $Date: 2000/11/09 19:14:00 $
|
||||
# $Revision: 1.8 $
|
||||
# $Date: 2000/11/28 17:53:39 $
|
||||
# $Author: kestes%staff.mail.com $
|
||||
# $Source: /home/hwine/cvs_conversion/cvsroot/mozilla/webtools/tinderbox2/src/test/gennotices.tst,v $
|
||||
# $Name: $
|
||||
|
@ -47,6 +47,7 @@ use lib '#tinder_libdir#';
|
|||
use TinderConfig;
|
||||
use Utils;
|
||||
use HTMLPopUp;
|
||||
use Persistence;
|
||||
|
||||
# since this is a test we do not want to use TinderConfig.pm to get
|
||||
# information about our configuration. Our test needs to be self
|
||||
|
@ -148,17 +149,13 @@ foreach $tree (@TREES) {
|
|||
"\t\t</p>\n"
|
||||
);
|
||||
|
||||
$out = <<EOF;
|
||||
|
||||
\$r = {
|
||||
'tree' => '$tree',
|
||||
'mailaddr' => '$mailaddr',
|
||||
'rendered_notice' => '$rendered_notice',
|
||||
'time' => '$timenow',
|
||||
'localtime' => '$localtimenow',
|
||||
};
|
||||
EOF
|
||||
;
|
||||
my (%data) = (
|
||||
'tree' => $tree,
|
||||
'mailaddr' => $mailaddr,
|
||||
'rendered_notice' => $rendered_notice,
|
||||
'time' => $timenow,
|
||||
'localtime' => $localtimenow,
|
||||
);
|
||||
|
||||
my ($update_file) = ("$TINDERBOX_DATA_DIR/$tree/db/".
|
||||
"Notice.Update.$timenow.$mailaddr");
|
||||
|
@ -169,12 +166,11 @@ EOF
|
|||
$update_file =~ s/\@/\./g;
|
||||
$update_file = main::extract_filename_chars($update_file);
|
||||
|
||||
open(FILE, ">$update_file");
|
||||
|
||||
print FILE $out;
|
||||
|
||||
close(FILE);
|
||||
|
||||
Persistence::save_structure(
|
||||
\%data,
|
||||
$update_file,
|
||||
);
|
||||
|
||||
} # foreach $j
|
||||
} # foreach $i
|
||||
} # foreach $tree
|
||||
|
|
Загрузка…
Ссылка в новой задаче