Title: [231328] trunk/Tools
Revision
231328
Author
[email protected]
Date
2018-05-03 14:27:58 -0700 (Thu, 03 May 2018)

Log Message

cleanup modules usage for the Test262-Runner
https://bugs.webkit.org/show_bug.cgi?id=185263

Patch by Leo Balter <[email protected]> on 2018-05-03
Reviewed by Michael Saboff.

* Scripts/test262-runner:
* Scripts/test262/Runner.pm:
(processCLI):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (231327 => 231328)


--- trunk/Tools/ChangeLog	2018-05-03 21:08:40 UTC (rev 231327)
+++ trunk/Tools/ChangeLog	2018-05-03 21:27:58 UTC (rev 231328)
@@ -1,3 +1,14 @@
+2018-05-03  Leo Balter  <[email protected]>
+
+        cleanup modules usage for the Test262-Runner
+        https://bugs.webkit.org/show_bug.cgi?id=185263
+
+        Reviewed by Michael Saboff.
+
+        * Scripts/test262-runner:
+        * Scripts/test262/Runner.pm:
+        (processCLI):
+
 2018-05-03  Valerie R Young  <[email protected]>
 
         test262/Runner.pm: minor fixes

Modified: trunk/Tools/Scripts/test262/Runner.pm (231327 => 231328)


--- trunk/Tools/Scripts/test262/Runner.pm	2018-05-03 21:08:40 UTC (rev 231327)
+++ trunk/Tools/Scripts/test262/Runner.pm	2018-05-03 21:27:58 UTC (rev 231328)
@@ -39,11 +39,15 @@
 use Cwd qw(abs_path);
 use FindBin;
 use Env qw(DYLD_FRAMEWORK_PATH);
-my $Bin;
-
 use Config;
-use Encode;
 
+my $podIsAvailable;
+if  (eval {require Pod::Usage; 1;}) {
+    Pod::Usage->import();
+    $podIsAvailable = 1;
+}
+
+my $Bin;
 BEGIN {
     $ENV{DBIC_OVERWRITE_HELPER_METHODS_OK} = 1;
 
@@ -60,7 +64,6 @@
 use YAML qw(Load LoadFile Dump DumpFile Bless);
 use Parallel::ForkManager;
 use Getopt::Long qw(GetOptions);
-use Pod::Usage;
 
 # Commandline settings
 my $max_process;
@@ -79,11 +82,6 @@
 my $latestImport;
 my $runningAllTests;
 
-processCLI();
-
-my @results;
-my @files;
-
 my $expectationsFile = abs_path("$Bin/expectations.yaml");
 my $configFile = abs_path("$Bin/config.yaml");
 my $resultsFile = abs_path("$Bin/results.yaml");
@@ -90,6 +88,9 @@
 my $summaryTxtFile = abs_path("$Bin/results-summary.txt");
 my $summaryFile = abs_path("$Bin/results-summary.yaml");
 
+my @results;
+my @files;
+
 my $tempdir = tempdir();
 
 my @default_harnesses = (
@@ -104,6 +105,7 @@
 
 my $startTime = time();
 
+processCLI();
 main();
 
 sub processCLI {
@@ -134,7 +136,12 @@
     );
 
     if ($help) {
-        pod2usage(-exitstatus => 0, -verbose => 2, -input => __FILE__);
+        if ($podIsAvailable) {
+            pod2usage(-exitstatus => 0, -verbose => 2, -input => __FILE__);
+        } else {
+            print "Pod::Usage is not available to print the help options\n";
+            exit;
+        }
     }
 
     if ($stats) {

Modified: trunk/Tools/Scripts/test262-runner (231327 => 231328)


--- trunk/Tools/Scripts/test262-runner	2018-05-03 21:08:40 UTC (rev 231327)
+++ trunk/Tools/Scripts/test262-runner	2018-05-03 21:27:58 UTC (rev 231328)
@@ -33,7 +33,6 @@
 
 use FindBin;
 use Config;
-use Encode;
 
 BEGIN {
     $ENV{DBIC_OVERWRITE_HELPER_METHODS_OK} = 1;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to