Skip to content

Instantly share code, notes, and snippets.

@leobalter
Last active June 21, 2018 16:41
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 leobalter/0530ebd4e5cc5b387ffe9685d7251337 to your computer and use it in GitHub Desktop.
Save leobalter/0530ebd4e5cc5b387ffe9685d7251337 to your computer and use it in GitHub Desktop.
#!/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