<commit_before>#! /bin/sh
#
#   * Build PHP extension 'libzookeeper'
#   * Test it
#
# Authors:
#   * <NAME> <<EMAIL>>
#   * <NAME> <<EMAIL>>
#

LIBZOOKEEPER_VERSION=$1
LIBZOOKEEPER_PREFIX=${HOME}/libzookeeper-${LIBZOOKEEPER_VERSION}

phpize || exit 1
CFLAGS="--coverage -fprofile-arcs -ftest-coverage" \
LDFLAGS="--coverage" \
./configure --with-libzookeeper=${LIBZOOKEEPER_PREFIX} || exit 1
make || exit 1

lcov --directory . --zerocounters &&
    lcov --directory . --capture --initial --output-file coverage.info
make test
lcov --no-checksum --directory . --capture --output-file coverage.info<commit_msg>add env NO_INTERACTION.<commit_after>#! /bin/sh
#
#   * Build PHP extension 'libzookeeper'
#   * Test it
#
# Authors:
#   * <NAME> <<EMAIL>>
#   * <NAME> <<EMAIL>>
#

LIBZOOKEEPER_VERSION=$1
LIBZOOKEEPER_PREFIX=${HOME}/libzookeeper-${LIBZOOKEEPER_VERSION}

phpize || exit 1
CFLAGS="--coverage -fprofile-arcs -ftest-coverage" \
LDFLAGS="--coverage" \
./configure --with-libzookeeper=${LIBZOOKEEPER_PREFIX} || exit 1
make || exit 1

lcov --directory . --zerocounters &&
    lcov --directory . --capture --initial --output-file coverage.info
export NO_INTERACTION=1 && make test
lcov --no-checksum --directory . --capture --output-file coverage.info
{'fraction_non_alphanumeric': 0.17211155378486057, 'fraction_numerical': 0.007171314741035857, 'mean_word_length': 3.7756653992395437, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '331128', 'n_tokens_mistral': 464, 'n_tokens_neox': 451, 'n_words': 95}