Last active
June 21, 2018 16:41
-
-
Save leobalter/0530ebd4e5cc5b387ffe9685d7251337 to your computer and use it in GitHub Desktop.
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/env perl | |
use strict; | |
use warnings; | |
use Getopt::Long qw(GetOptions); | |
my $args = ''; | |
GetOptions( | |
'diff' => sub { | |
$args .= "\$(git diff --name-only --diff-filter=d master test) "; | |
}, | |
); | |
my $files = join(' ', @ARGV); | |
# I need to specify the full path for JSC to make it work with the test262-harness | |
my $jscPath = qx/which jsc/; | |
chomp $jscPath; | |
my %engines = ( | |
jsshell => 'spidermonkey', | |
ch => 'ch', | |
d8 => 'v8', | |
jsc => $jscPath, | |
); | |
keys %engines; | |
while (my ($type, $path) = each %engines) { | |
print qq/------- $path -------\n/; | |
my $cmd = qq/test262-harness --hostType=$type --hostPath=$path $args$files/; | |
print qq/$cmd\n/; | |
system($cmd); | |
print qq{\n\n}; | |
} | |
print "done\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment