Skip to content

Instantly share code, notes, and snippets.

@dpino
Last active August 29, 2015 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpino/d734d4b96a5a1eee81e3 to your computer and use it in GitHub Desktop.
Save dpino/d734d4b96a5a1eee81e3 to your computer and use it in GitHub Desktop.
Helper script for running V8 tests
#!/usr/bin/perl
use strict;
my $V8_PATH=undef; # Absolute path to your V8 folder
my $RUN_TEST="tools/run-tests.py";
my $ARCH_AND_MODE="x64.release";
if (!$V8_PATH || scalar(@ARGV) != 1) {
help();
}
sub help
{
print "Usage: v8-test <path-to-test-file>\n";
# Example: v8-test test/mjsunit/es6/math-hypot.js
exit;
}
my $filename = $ARGV[0];
# Remove .js extension if any
$filename =~ s/(.*?)\.js/$1/;
# Remove heading to name of test if any
$filename =~ s/.*?test\/(.*?)/$1/;
print "$V8_PATH/$RUN_TEST --arch-and-mode=$ARCH_AND_MODE --no-presubmit --no-network $filename\n";
system("$V8_PATH/$RUN_TEST --arch-and-mode=$ARCH_AND_MODE --no-presubmit --no-network $filename");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment