<commit_before>#!/bin/bash
# This script is used to merge separate lcov output from each test.
# Once they are in a single file, we create the html output with genhtml
# XXX FIXME .. there is no reason to merge them. This just east CPU
# time...
BASEDIR=.
rm -r ${BASEDIR}/lcov

ifiles=""
for f in ${BASEDIR}/coverage/*.info; do
    ifiles="$ifiles -a $f"
done
echo "*** Combining all lcov .info files into single file"
echo Command is: lcov --directory ${BASEDIR} $ifiles --output-file ${BASEDIR}/coverage/alltemp.info
lcov --directory ${BASEDIR} $ifiles --output-file ${BASEDIR}/coverage/alltemp.info
echo "*** Removing coverage info for non-AtomSpace files"
# Get the name of the current dir
BUILD_DIR=${PWD##*/}
echo Command is: lcov --directory ${BASEDIR} --output-file ${BASEDIR}/coverage/all.info \
    --remove ${BASEDIR}/coverage/alltemp.info \
        /usr/include/\* \
        ${BUILD_DIR}/tests/\*
time lcov --directory ${BASEDIR} --output-file ${BASEDIR}/coverage/all.info \
    --remove ${BASEDIR}/coverage/alltemp.info \
        /usr/include/\* \
        ${BUILD_DIR}/tests/\*
#rm ${BASEDIR}/coverage/alltemp.info

echo "Creating lcov html summary"
echo Command is: genhtml -s -o ${BASEDIR}/lcov --demangle-cpp --num-spaces 4 --title "AtomSpace Coverage Analysis" ${BASEDIR}/coverage/all.info
time genhtml -s -o ${BASEDIR}/lcov --demangle-cpp --num-spaces 4 --title "AtomSpace Coverage Analysis" ${BASEDIR}/coverage/all.info
echo "Moving coverage files to ${BASEDIR}/coverage/old"
mkdir -p ${BASEDIR}/coverage/old
for f in ${BASEDIR}/coverage/*.info; do
    mv $f ${BASEDIR}/coverage/old
done
echo "All done!"
<commit_msg>Tell user where to find the reports<commit_after>#!/bin/bash
# This script is used to merge separate lcov output from each test.
# Once they are in a single file, we create the html output with genhtml
# XXX FIXME .. there is no reason to merge them. This just east CPU
# time...
BASEDIR=.
rm -r ${BASEDIR}/lcov

ifiles=""
for f in ${BASEDIR}/coverage/*.info; do
    ifiles="$ifiles -a $f"
done
echo "*** Combining all lcov .info files into single file"
echo Command is: lcov --directory ${BASEDIR} $ifiles --output-file ${BASEDIR}/coverage/alltemp.info
lcov --directory ${BASEDIR} $ifiles --output-file ${BASEDIR}/coverage/alltemp.info
echo "*** Removing coverage info for non-AtomSpace files"
# Get the name of the current dir
BUILD_DIR=${PWD##*/}
echo Command is: lcov --directory ${BASEDIR} --output-file ${BASEDIR}/coverage/all.info \
    --remove ${BASEDIR}/coverage/alltemp.info \
        /usr/include/\* \
        ${BUILD_DIR}/tests/\*
time lcov --directory ${BASEDIR} --output-file ${BASEDIR}/coverage/all.info \
    --remove ${BASEDIR}/coverage/alltemp.info \
        /usr/include/\* \
        ${BUILD_DIR}/tests/\*
#rm ${BASEDIR}/coverage/alltemp.info

echo "Creating lcov html summary"
echo Command is: genhtml -s -o ${BASEDIR}/lcov --demangle-cpp --num-spaces 4 --title "AtomSpace Coverage Analysis" ${BASEDIR}/coverage/all.info
time genhtml -s -o ${BASEDIR}/lcov --demangle-cpp --num-spaces 4 --title "AtomSpace Coverage Analysis" ${BASEDIR}/coverage/all.info
echo "Moving coverage files to ${BASEDIR}/coverage/old"
mkdir -p ${BASEDIR}/coverage/old
for f in ${BASEDIR}/coverage/*.info; do
    mv $f ${BASEDIR}/coverage/old
done
echo "All done!"
echo "Coverage reports are in ${BASEDIR}/lcov; use web browser to view."

{'fraction_non_alphanumeric': 0.15316117542297417, 'fraction_numerical': 0.0011872959335114278, 'mean_word_length': 3.578804347826087, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '4297601', 'n_tokens_mistral': 1107, 'n_tokens_neox': 1128, 'n_words': 361}