mirror of
https://github.com/perlbot/perlbuut
synced 2025-06-07 16:15:39 -04:00
Switch to a newer perl-blead. Start recording evals to build up a fuzz-suite for CI perl-bleads
This commit is contained in:
parent
7d8f2553f4
commit
9ce72f6ac2
4 changed files with 15 additions and 4 deletions
|
@ -72,5 +72,8 @@ requires 'Mojo::DOM' => 0;
|
|||
requires 'Mojo::DOM::CSS' => 0;
|
||||
requires 'Mojo::Collection' => 0;
|
||||
requires 'YAPE::Regex::Explain' => 0;
|
||||
requires 'bigint' => 0;
|
||||
requires 'Math::BigInt' => 0;
|
||||
requires 'indirect' => 0;
|
||||
|
||||
WriteAll;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/home/ryan/perl5/perlbrew/perls/perl-5.22.0/bin/perl
|
||||
#!/home/ryan/perl5/perlbrew/perls/blead-april-04/bin/perl
|
||||
|
||||
#use local::lib;
|
||||
# Guess we're being activated inside bin/, so go up a directory.
|
||||
|
|
10
lib/eval.pl
10
lib/eval.pl
|
@ -50,6 +50,10 @@ require "utf8_heavy.pl";
|
|||
use arybase;
|
||||
use Errno;
|
||||
|
||||
require indirect;
|
||||
|
||||
eval 'use bigint; use Math::BigInt; 1e1000';
|
||||
|
||||
{
|
||||
my $len = eval "lc 'ẞ'";
|
||||
warn $@ if $@;
|
||||
|
@ -105,7 +109,7 @@ eval {"\N{SPARKLE}"}; # force loading of some of the charnames stuff
|
|||
use B::Deparse;
|
||||
|
||||
# Javascript Libs
|
||||
BEGIN{ eval "use JavaScript::V8; use JSON::XS; JavaScript::V8::Context->new()->eval('1')"; }
|
||||
BEGIN{ eval "use JavaScript::V8; require JSON::XS; JavaScript::V8::Context->new()->eval('1')"; }
|
||||
my $JSENV_CODE = do { local $/; open my $fh, "deps/env.js"; <$fh> };
|
||||
require 'bytes_heavy.pl';
|
||||
|
||||
|
@ -199,10 +203,10 @@ use Storable qw/nfreeze/; nfreeze([]); #Preload Nfreeze since it's loaded on dem
|
|||
|
||||
my $kilo = 1024;
|
||||
my $meg = $kilo * $kilo;
|
||||
my $limit = 768 * $meg;
|
||||
my $limit = 1024 * $meg;
|
||||
|
||||
(
|
||||
setrlimit(RLIMIT_VMEM, 1024*$meg, 1024*$meg)
|
||||
setrlimit(RLIMIT_VMEM, 1.5*$limit, 1.5*$limit)
|
||||
and
|
||||
setrlimit(RLIMIT_DATA, $limit, $limit )
|
||||
and
|
||||
|
|
|
@ -20,6 +20,7 @@ sub new {
|
|||
command => 1,
|
||||
};
|
||||
$self->{aliases} = [ qw/jseval jeval phpeval pleval perleval deparse k20eval rbeval pyeval luaeval/ ];
|
||||
$self->{dbh} = DBI->connect("dbi:SQLite:dbname=var/evallogs.db");
|
||||
|
||||
return $self;
|
||||
}
|
||||
|
@ -28,6 +29,7 @@ sub command {
|
|||
my( $self, $said, $pm ) = @_;
|
||||
|
||||
my $code = $said->{"body"};
|
||||
my $dbh = $self->{dbh};
|
||||
|
||||
my $type = $said->{command_match};
|
||||
$type =~ s/^\s*(\w+?)eval/$1/;
|
||||
|
@ -66,6 +68,8 @@ sub command {
|
|||
my $result = $filter->get( [ $output ] );
|
||||
my $resultstr = $result->[0]->[0];
|
||||
|
||||
$dbh->do("INSERT INTO evals (input, output) VALUES (?, ?)", {}, $code, $resultstr);
|
||||
|
||||
if (!$said->{captured} && $resultstr !~ /\S/) {
|
||||
$resultstr = "No output.";
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue