Skip to content

Commit a7cc220

Browse files
committed
Fix runtest to not override LSAN OPTIONS
1 parent 118473e commit a7cc220

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

run-tests.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -585,8 +585,11 @@ function main(): void
585585

586586
$lsanSuppressions = __DIR__ . '/.github/lsan-suppressions.txt';
587587
if (file_exists($lsanSuppressions)) {
588-
$environment['LSAN_OPTIONS'] = 'suppressions=' . $lsanSuppressions
589-
. ':print_suppressions=0';
588+
$suppressionOption = 'suppressions=' . $lsanSuppressions . ':print_suppressions=0';
589+
if (array_key_exists('LSAN_OPTIONS', $environment)) {
590+
$environment['LSAN_OPTIONS'] = $environment['LSAN_OPTIONS'] . ':' . $suppressionOption;
591+
}
592+
$environment['LSAN_OPTIONS'] = $suppressionOption;
590593
}
591594
break;
592595
case '--repeat':

0 commit comments

Comments
 (0)