← Commit list

3025c9778a

Viktor Szakats
Viktor Szakats
2026-03-21
SUCCESS Duration: 252s

Subject

testcurl.pl: replace shell commands with Perl `rmtree()`

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

tests/testcurl.pl+3 -14
@@ -64,6 +64,7 @@ use strict;
use warnings;
use Cwd;
+use File::Path;
use File::Spec;
# Turn on warnings (equivalent to -w, which cannot be used with /usr/bin/env)
@@ -185,18 +186,6 @@ $ENV{LC_ALL}="C" if(($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
$ENV{LC_CTYPE}="C" if(($ENV{LC_CTYPE}) && ($ENV{LC_CTYPE} !~ /^C$/));
$ENV{LANG}="C";
-sub rmtree($) {
- my $target = $_[0];
- if($^O eq 'MSWin32') {
- foreach (glob($target)) {
- s:/:\\:g;
- system('rd', ('/s', '/q', $_));
- }
- } else {
- system('rm', ('-rf', $target));
- }
-}
-
sub grepfile($$) {
my ($target, $fn) = @_;
open(my $fh, "<", $fn) or die;
@@ -392,8 +381,8 @@ $buildlogname="buildlog-$$";
$buildlog="$pwd/$buildlogname";
# remove any previous left-overs
-rmtree "build-*";
-rmtree "buildlog-*";
+foreach(glob("build-*")) { rmtree $_; }
+foreach(glob("buildlog-*")) { rmtree $_; }
# this is to remove old build logs that ended up in the wrong dir
foreach(glob("$CURLDIR/buildlog-*")) { unlink $_; }