Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
Applications
tor-browser-bundle-testsuite
Commits
20efa6d8
Unverified
Commit
20efa6d8
authored
Aug 28, 2014
by
boklm
Browse files
Use YAML::Syck instead of YAML
YAML::Syck is much faster
parent
6f81e2d5
Changes
4
Hide whitespace changes
Inline
Side-by-side
TBBTestSuite/Reports.pm
View file @
20efa6d8
...
@@ -10,7 +10,7 @@ use File::Slurp;
...
@@ -10,7 +10,7 @@ use File::Slurp;
use
Template
;
use
Template
;
use
File::
Spec
;
use
File::
Spec
;
use
JSON
;
use
JSON
;
use
YAML
;
use
YAML
::
Syck
;
use
TBBTestSuite::
Common
qw(exit_error as_array)
;
use
TBBTestSuite::
Common
qw(exit_error as_array)
;
use
TBBTestSuite::
Options
qw($options)
;
use
TBBTestSuite::
Options
qw($options)
;
use
TBBTestSuite::
Tests
;
use
TBBTestSuite::
Tests
;
...
@@ -221,7 +221,7 @@ sub load_report {
...
@@ -221,7 +221,7 @@ sub load_report {
return
$reports
{
$report_name
}
if
exists
$reports
{
$report_name
};
return
$reports
{
$report_name
}
if
exists
$reports
{
$report_name
};
my
$reportfile
=
"
$options
->{'reports-dir'}/r/
$report_name
/report.yml
";
my
$reportfile
=
"
$options
->{'reports-dir'}/r/
$report_name
/report.yml
";
return
undef
unless
-
f
$reportfile
;
return
undef
unless
-
f
$reportfile
;
return
$reports
{
$report_name
}
=
YAML::
LoadFile
(
$reportfile
);
return
$reports
{
$report_name
}
=
YAML::
Syck::
LoadFile
(
$reportfile
);
}
}
sub
load_reports_for_index
{
sub
load_reports_for_index
{
...
@@ -272,7 +272,7 @@ sub save_report_summary {
...
@@ -272,7 +272,7 @@ sub save_report_summary {
sub
save_report
{
sub
save_report
{
my
(
$report
)
=
@_
;
my
(
$report
)
=
@_
;
save_report_summary
(
$report
);
save_report_summary
(
$report
);
YAML::
DumpFile
(
report_path
(
$report
,
'
report.yml
'),
$report
);
YAML::
Syck::
DumpFile
(
report_path
(
$report
,
'
report.yml
'),
$report
);
}
}
1
;
1
;
TBBTestSuite/Reports/Receive.pm
View file @
20efa6d8
...
@@ -2,7 +2,7 @@ package TBBTestSuite::Reports::Receive;
...
@@ -2,7 +2,7 @@ package TBBTestSuite::Reports::Receive;
use
warnings
;
use
warnings
;
use
strict
;
use
strict
;
use
YAML
qw(LoadFile)
;
use
YAML
::
Syck
qw(LoadFile)
;
use
File::
Path
qw(make_path)
;
use
File::
Path
qw(make_path)
;
use
File::
Temp
;
use
File::
Temp
;
use
File::
Copy
;
use
File::
Copy
;
...
...
install-deps
View file @
20efa6d8
...
@@ -17,7 +17,7 @@ yum_install() {
...
@@ -17,7 +17,7 @@ yum_install() {
perlmodules
=
'
perlmodules
=
'
Cwd Data::Dump Digest::SHA File::Path File::Slurp File::Spec File::Temp
Cwd Data::Dump Digest::SHA File::Path File::Slurp File::Spec File::Temp
FindBin Getopt::Long IO::CaptureOutput IO::Socket::INET Image::Magick
FindBin Getopt::Long IO::CaptureOutput IO::Socket::INET Image::Magick
JSON LWP::UserAgent LWP::Protocol::https Template YAML DateTime
JSON LWP::UserAgent LWP::Protocol::https Template YAML
::Syck
DateTime
Email::Simple Email::Sender File::Type IPC::Run XML::LibXML
Email::Simple Email::Sender File::Type IPC::Run XML::LibXML
'
'
...
@@ -26,7 +26,7 @@ then
...
@@ -26,7 +26,7 @@ then
apt-get
install
-y
ntp xvfb python-virtualenv
apt-get
install
-y
ntp xvfb python-virtualenv
apt-get
install
-y
libdata-dump-perl libdigest-sha-perl libfile-slurp-perl
\
apt-get
install
-y
libdata-dump-perl libdigest-sha-perl libfile-slurp-perl
\
libfile-spec-perl libio-captureoutput-perl perlmagick libjson-perl
\
libfile-spec-perl libio-captureoutput-perl perlmagick libjson-perl
\
libwww-perl libtemplate-perl libyaml-perl libdatetime-perl
\
libwww-perl libtemplate-perl libyaml-
syck-
perl libdatetime-perl
\
libemail-sender-perl libemail-simple-perl libfile-type-perl
\
libemail-sender-perl libemail-simple-perl libfile-type-perl
\
libipc-run-perl libxml-libxml-perl
libipc-run-perl libxml-libxml-perl
apt-get
install
-y
libgtk2.0-0
apt-get
install
-y
libgtk2.0-0
...
...
tbb-testsuite
View file @
20efa6d8
...
@@ -4,7 +4,7 @@ use FindBin;
...
@@ -4,7 +4,7 @@ use FindBin;
use
lib
"
$FindBin
::Bin
";
use
lib
"
$FindBin
::Bin
";
use
Data::
Dump
qw/dd/
;
use
Data::
Dump
qw/dd/
;
use
File::
Path
qw(make_path)
;
use
File::
Path
qw(make_path)
;
use
YAML
;
use
YAML
::
Syck
;
use
TBBTestSuite::
Common
qw(exit_error run_alone rm_pidfile)
;
use
TBBTestSuite::
Common
qw(exit_error run_alone rm_pidfile)
;
use
TBBTestSuite::
Options
qw($options)
;
use
TBBTestSuite::
Options
qw($options)
;
use
TBBTestSuite::
Reports
qw(report_dir report_path save_report)
;
use
TBBTestSuite::
Reports
qw(report_dir report_path save_report)
;
...
@@ -60,7 +60,7 @@ sub run_tests {
...
@@ -60,7 +60,7 @@ sub run_tests {
sub
load_report_from_file
{
sub
load_report_from_file
{
exit_error
"
--name is not set
"
unless
$options
->
{
name
};
exit_error
"
--name is not set
"
unless
$options
->
{
name
};
my
$report
=
{
options
=>
$options
};
my
$report
=
{
options
=>
$options
};
$report
=
YAML::
LoadFile
(
report_path
(
$report
,
'
report.yml
'));
$report
=
YAML::
Syck::
LoadFile
(
report_path
(
$report
,
'
report.yml
'));
$report
->
{
options
}
=
{
%
{
$report
->
{
options
}},
%$options
};
$report
->
{
options
}
=
{
%
{
$report
->
{
options
}},
%$options
};
return
$report
;
return
$report
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment