mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
[skip ci] Fix valgrind benchmark diff output
Don't print command when searching benchmarked commit, as this breaks the markdown summary.
This commit is contained in:
parent
a1620048fb
commit
c0b441f8fd
2 changed files with 9 additions and 3 deletions
|
@ -73,7 +73,11 @@ function find_benchmarked_commit_hash(string $repo, string $commitHash): ?string
|
||||||
if (file_exists($summaryFile)) {
|
if (file_exists($summaryFile)) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$commitHash = trim(runCommand(['git', 'rev-parse', $commitHash . '^'], dirname(__DIR__))->stdout);
|
$commitHash = trim(runCommand(
|
||||||
|
['git', 'rev-parse', $commitHash . '^'],
|
||||||
|
dirname(__DIR__),
|
||||||
|
printCommand: false,
|
||||||
|
)->stdout);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $commitHash;
|
return $commitHash;
|
||||||
|
|
|
@ -5,12 +5,14 @@ class ProcessResult {
|
||||||
public $stderr;
|
public $stderr;
|
||||||
}
|
}
|
||||||
|
|
||||||
function runCommand(array $args, ?string $cwd = null): ProcessResult {
|
function runCommand(array $args, ?string $cwd = null, bool $printCommand = true): ProcessResult {
|
||||||
$cmd = implode(' ', array_map('escapeshellarg', $args));
|
$cmd = implode(' ', array_map('escapeshellarg', $args));
|
||||||
$pipes = null;
|
$pipes = null;
|
||||||
$result = new ProcessResult();
|
$result = new ProcessResult();
|
||||||
$descriptorSpec = [0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']];
|
$descriptorSpec = [0 => ['pipe', 'r'], 1 => ['pipe', 'w'], 2 => ['pipe', 'w']];
|
||||||
fwrite(STDOUT, "> $cmd\n");
|
if ($printCommand) {
|
||||||
|
fwrite(STDOUT, "> $cmd\n");
|
||||||
|
}
|
||||||
$processHandle = proc_open($cmd, $descriptorSpec, $pipes, $cwd ?? getcwd(), null);
|
$processHandle = proc_open($cmd, $descriptorSpec, $pipes, $cwd ?? getcwd(), null);
|
||||||
|
|
||||||
$stdin = $pipes[0];
|
$stdin = $pipes[0];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue