Changeset 231526 in webkit


Ignore:
Timestamp:
May 8, 2018 5:04:10 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

test262/Runner.pm: create results dir for results of test262 run
https://bugs.webkit.org/show_bug.cgi?id=185392

Patch by Valerie R Young <valerie@bocoup.com> on 2018-05-08
Reviewed by Michael Saboff.

.:

Remove reference to no longer existing files.

  • .gitignore:

Tools:

New directory test262-results created from where ever script is
called.

  • Scripts/test262/Runner.pm:

(processCLI):

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/.gitignore

    r231252 r231526  
    4949# Ignore YouCompleteMe symlinks
    5050.ycm_extra_conf.py
    51 
    52 # Ignore generated Test262 results files
    53 Tools/Scripts/test262/results.yaml
    54 Tools/Scripts/test262/results-summary.yaml
    55 Tools/Scripts/test262/results-summary.txt
  • trunk/ChangeLog

    r231478 r231526  
     12018-05-08  Valerie R Young  <valerie@bocoup.com>
     2
     3        test262/Runner.pm: create results dir for results of test262 run
     4        https://bugs.webkit.org/show_bug.cgi?id=185392
     5
     6        Reviewed by Michael Saboff.
     7
     8        Remove reference to no longer existing files.
     9
     10        * .gitignore:
     11
    1122018-05-07  Yusuke Suzuki  <utatane.tea@gmail.com>
    213
  • trunk/Tools/ChangeLog

    r231525 r231526  
     12018-05-08  Valerie R Young  <valerie@bocoup.com>
     2
     3        test262/Runner.pm: create results dir for results of test262 run
     4        https://bugs.webkit.org/show_bug.cgi?id=185392
     5
     6        Reviewed by Michael Saboff.
     7
     8        New directory test262-results created from where ever script is
     9        called.
     10
     11        * Scripts/test262/Runner.pm:
     12        (processCLI):
     13
    1142018-05-08  Valerie R Young  <valerie@bocoup.com>
    215
  • trunk/Tools/Scripts/test262/Runner.pm

    r231525 r231526  
    3737use File::Spec::Functions qw(abs2rel);
    3838use File::Basename qw(dirname);
     39use File::Path qw(mkpath);
    3940use Cwd qw(abs_path);
    4041use FindBin;
     
    8586my $expectationsFile = abs_path("$Bin/../../../JSTests/test262/expectations.yaml");
    8687my $configFile = abs_path("$Bin/../../../JSTests/test262/config.yaml");
    87 my $resultsFile = abs_path("$Bin/results.yaml");
    88 my $summaryTxtFile = abs_path("$Bin/results-summary.txt");
    89 my $summaryFile = abs_path("$Bin/results-summary.yaml");
     88
     89my $resultsDir = `pwd`;
     90chomp $resultsDir;
     91$resultsDir = $resultsDir . "/test262-results";
     92mkpath($resultsDir);
     93
     94my $resultsFile = abs_path("$resultsDir/results.yaml");
     95my $summaryTxtFile = abs_path("$resultsDir/summary.txt");
     96my $summaryFile = abs_path("$resultsDir/summary.yaml");
    9097
    9198my @results;
     
    107114    my @features;
    108115    my $stats;
     116    my $specifiedResultsFile;
    109117
    110118    # If adding a new commandline argument, you must update the POD
     
    126134        'l|latest-import' => \$latestImport,
    127135        'stats' => \$stats,
     136        'r|results=s' => \$specifiedResultsFile,
    128137    );
    129138
     
    137146    }
    138147
     148    if ($specifiedResultsFile) {
     149        if (!$stats) {
     150            print "Waring: supplied results file not used for this command.\n";
     151        }
     152        elsif (-e $specifiedResultsFile) {
     153            $resultsFile = $specifiedResultsFile;
     154        }
     155        else {
     156            die "Error: results file $specifiedResultsFile does not exist.";
     157        }
     158    }
     159
    139160    if ($stats) {
     161        if (! -e $resultsFile) {
     162            die "Error: cannot find results file, please specify with --results.";
     163        }
    140164        summarizeResults();
    141165        exit;
     
    183207        # --failures-only option supplied.
    184208        if ( $failingOnly && ! -e $expectationsFile ) {
    185             print "Error: Cannot run failing tests if test262-expectation.yaml file does not exist.\n";
     209            print "Error: Cannot run failing tests if expectation.yaml file does not exist.\n";
    186210            die;
    187211        } elsif (-e $expectationsFile) {
     
    885909=item B<--stats>
    886910
    887 Calculate conformance statistics from JSTests/test262-results.yaml file. Saves results in JSTests/test262/results-summary.txt and JSTests/test262/results-summary.yaml.
     911Calculate conformance statistics from results/results.yaml file or a supplied results file (--results). Saves results in results/summary.txt and results/summary.yaml.
     912
     913=item B<--results, -r>
     914
     915Specifies a results file the --stats option.
    888916
    889917=back
Note: See TracChangeset for help on using the changeset viewer.