Last active
August 29, 2015 14:04
-
-
Save dpino/d734d4b96a5a1eee81e3 to your computer and use it in GitHub Desktop.
Helper script for running V8 tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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