From 617fc4480e31f7f48580875e2742b5a37332b7a4 Mon Sep 17 00:00:00 2001 From: Ralf Haferkamp Date: Thu, 28 Nov 2024 16:21:33 +0100 Subject: [PATCH] Use sed instead of tr to remove nullbytes The tr + echo was using HUGE amounts for memory due to some IFS- and parameter expansion magic. --- tests/acceptance/run.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/acceptance/run.sh b/tests/acceptance/run.sh index a1bc1953c0..85d9b0bc6e 100755 --- a/tests/acceptance/run.sh +++ b/tests/acceptance/run.sh @@ -206,11 +206,7 @@ function run_behat_tests() { BEHAT_EXIT_STATUS=${PIPESTATUS[0]} # remove nullbytes from the test log - TEMP_CONTENT=$(tr < ${TEST_LOG_FILE} -d '\000') - OLD_IFS="${IFS}" - IFS="" - echo ${TEMP_CONTENT} > ${TEST_LOG_FILE} - IFS="${OLD_IFS}" + sed -i 's/\x0//g' ${TEST_LOG_FILE} # Find the count of scenarios that passed SCENARIO_RESULTS_COLORED=`grep -Ea '^[0-9]+[[:space:]]scenario(|s)[[:space:]]\(' ${TEST_LOG_FILE}`