<commit_before>#!/bin/sh
# Make tests shut up. On success, if stdout is a tty, we only output messages
# about skipped tests; on failure, or if stdout is a file or pipe, we output
# the lot.
#
# Usage: test-wrapper.sh PROGRAM [ARGS...]

set -e
e=0
"$@" > capture-$$.log 2>&1 || e=$?
if test z$e = z0 && test -t 1; then
  grep -i skipped capture-$$.log || true
  rm -f capture-$$.log
else
  cat capture-$$.log
  exit $e
fi

# Copyright © 2010 Collabora Ltd. <http://www.collabora.co.uk/>
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. There is no warranty.<commit_msg>fd.o #31129: if stdout is not a tty or CHECK_VERBOSE is set, do not delay test output<commit_after>#!/bin/sh
# Make tests shut up. On success, if stdout is a tty, we only output messages
# about skipped tests; on failure, or if stdout is a file or pipe, we output
# the lot.
#
# Usage: test-wrapper.sh PROGRAM [ARGS...]

set -e

if test -t 1 || test "z$CHECK_VERBOSE" != z; then
  "$@" || e=$?
  exit $e
fi

e=0
"$@" > capture-$$.log 2>&1 || e=$?
if test z$e = z0; then
  grep -i skipped capture-$$.log || true
  rm -f capture-$$.log
else
  cat capture-$$.log
  exit $e
fi

# Copyright © 2010 Collabora Ltd. <http://www.collabora.co.uk/>
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. There is no warranty.
{'fraction_non_alphanumeric': 0.12605588044184535, 'fraction_numerical': 0.014944769330734242, 'mean_word_length': 3.4508670520231215, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3061535', 'n_tokens_mistral': 535, 'n_tokens_neox': 501, 'n_words': 226}