tree: afb6ab76f28bf81f656cc796e76cee2a14e4d754 [path history] [tgz]
  1. local/
  2. cpanfile
  3. cpanfile.snapshot
  4. expectation.yaml
  7. report.css

Test262 Tools

Runner script

To execute the Test262 Runner script, just call it through your shell.


Custom options

If you need to customize the execution, check out --help for extra commands.


This yaml file can be used to skip tests. An example file:

    - test/built-ins/Atomics
    - SharedArrayBuffer
    - BigInt
    - test/built-ins/Array/prototype/reverse/length-exceeding-integer-limit-with-object.js
    - test/built-ins/Array/prototype/unshift/length-near-integer-limit.js


This file contains all exected failures. If JSC or Test262 is updated, this file should be updated with the new set of expected tests in order for developers to only see errors they introduce.

To update this file, run: --save-expectations


This file contains results for all tests. It is updated on every run.

Import Script

To execute the Test262 Import script, just call it through your shell. The script will update the JSTests/test262 folder.


Custom options

If you need to customize the execution, check out --help for extra commands.


The Test262 Runner script requires Perl 5.8.8, to install Perl 5.8.8, use Perlbrew.

It’s not necessary to install Perl 5.8.8 to execute the runner script if you have a more recent version of Perl 5.x.x installed.

It's also not necessary to install or configure anything extra to execute the runner script. The script dependencies are also stored locally.

Installing Perlbrew


\curl -L | bash

Linux (Debian derivative):

sudo apt-get install perlbrew
perlbrew init

Loading Perlbrew

Append the following piece of code to the end of your ~/.bash_profile and start a new shell, perlbrew should be up and fully functional from there:

source ~/perl5/perlbrew/etc/bashrc

Installing Perl 5.8.8 through Perlbrew


perlbrew install perl-5.8.8


perlbrew --notest install perl-5.8.8 # Perl 5.8.8 has some known compilation errors

Switching to Perl versions

perlbrew switch perl-5.8.8
perlbrew switch perl-5.27.6
# ...

Install cpanminus and Carton

Install cpanminus and Carton to set and manage dependencies.

perlbrew install-cpanm
cpanm install Carton

Installing dependencies through Carton

From the Tools/Scripts/test262-helpes/ folder, run carton install to install dependencies from the cpanfile.

More documentation on the cpanfile here.

Executing the script using Carton:

carton exec

Loading dependencies without Carton

To run the script without Carton, prepend your script file with the following code:

use FindBin;
use Config;
use Encode;


    unshift @INC, ".";
    unshift @INC, "$FindBin::Bin/lib";
    unshift @INC, "$FindBin::Bin/local/lib/perl5";
    unshift @INC, "$FindBin::Bin/local/lib/perl5/$Config{archname}";

    $ENV{LOAD_ROUTES} = 1;