Sfoglia il codice sorgente

Fix test-ref logging for macos

mikemirzayanov 7 mesi fa
parent
commit
80530b3738
1 ha cambiato i file con 3 aggiunte e 1 eliminazioni
  1. 3 1
      tests/scripts/test-ref

+ 3 - 1
tests/scripts/test-ref

@@ -72,7 +72,9 @@ else
   exit_code=0
   # shellcheck disable=SC2048
   $* 1>"$refs"/stdout.aux 2>"$refs"/stderr.aux || exit_code=$?
-  echo "Program exit code: $exit_code, stdout size: $(stat -c %s "$refs"/stdout.aux) bytes, stderr size: $(stat -c %s "$refs"/stderr.aux) bytes"
+  stdout_size=$(wc -c < "$refs"/stdout.aux)
+  stderr_size=$(wc -c < "$refs"/stderr.aux)
+  echo "Program exit code: $exit_code, stdout size: $stdout_size bytes, stderr size: $stderr_size bytes"
   echo $exit_code >"$refs"/exit_code.aux
 
   # Check exit code is the same