Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : test-leaks.pl
#!/usr/bin/perl
############################################################
# this perl script is meant for developers only!
# it will run all spec-tests (without verifying the
# results) via valgrind to detect possible leaks.
# expect that it takes 1h or more to finish!
############################################################
# Prerequisite install: `cpan Parallel::Runner`
# You may also need to install `cpan File::Find`
# You may also need to install `cpan IPC::Run3`
############################################################
# usage: `perl test-leaks.pl [threads]`
# example: `time perl test-leaks.pl 4`
############################################################
# leaks will be reported in "mem-leaks.log"
############################################################

use strict;
use warnings;

############################################################
# configurations (you may adjust)
############################################################

# number of threads to use
my $threads = $ARGV[0] || 8;

# the github repositories to checkout
# if you need other branch, clone manually!
my $sassc = "https://www.github.com/sass/sassc";
my $specs = "https://www.github.com/sass/sass-spec";

############################################################
# load modules
############################################################

use IPC::Run3;
use IO::Handle;
use Fcntl qw(:flock);
use File::Find::Rule;
use Parallel::Runner;
use List::Util qw(shuffle);

############################################################
# check prerequisites
############################################################

unless (-d "../sassc") {
  warn "sassc folder not found\n";
  warn "trying to checkout via git\n";
  system("git", "clone", $sassc, "../sassc");
  die "git command did not exit gracefully" if $?;
}

unless (-d "../sass-spec") {
  warn "sass-spec folder not found\n";
  warn "trying to checkout via git\n";
  system("git", "clone", $specs, "../sass-spec");
  die "git command did not exit gracefully" if $?;
}

unless (-f "../sassc/bin/sassc") {
  warn "sassc executable not found\n";
  warn "trying to compile via make\n";
  system("make", "-C", "../sassc", "-j", $threads);
  die "make command did not exit gracefully" if $?;
}

############################################################
# main runner code
############################################################

my $root = "../sass-spec/spec";
my @files = File::Find::Rule->file()
            ->name('input.scss')->in($root);

open(my $leaks, ">", "mem-leaks.log");
die "Cannot open log" unless $leaks;
my $runner = Parallel::Runner->new($threads);
die "Cannot start runner" unless $runner;

print "##########################\n";
print "Testing $#files spec files\n";
print "##########################\n";

foreach my $file (shuffle @files) {
  $runner->run(sub {
    $| = 1; select STDOUT;
    my $cmd = sprintf('../sassc/bin/sassc %s', $file);
    my $check = sprintf('valgrind --leak-check=yes %s', $cmd);
    run3($check, undef, \ my $out, \ my $err);
    if ($err =~ m/in use at exit: 0 bytes in 0 blocks/) {
      print "."; # print success indicator
    } else {
      print "F"; # print error indicator
      flock($leaks, LOCK_EX) or die "Cannot lock log";
      $leaks->printflush("#" x 80, "\n", $err, "\n");
      flock($leaks, LOCK_UN) or die "Cannot unlock log";
    }
  });
}

$runner->finish;
© 2026 GrazzMean
Page non trouvée – APK Comptoir Hammami
Jannah Theme License is not validated, Go to the theme options page to validate the license, You need a single license for each domain name.

404 :(

Oups ! Cette page est introuvable.

Il semble que nous ne puissions pas trouver ce que vous cherchez. Peut-être qu'une recherche pourrait vous aider.

Bouton retour en haut de la page