<commit_before>#!/bin/bash

THISDIR=$(dirname ${BASH_SOURCE[0]})
source ${THISDIR}/../../common/functions.sh

out=${out-/dev/null}

stPass="[PASSED]"
stFail="[FAILED]"

passed=0
failed=0

resDirAll=$(mktemp -d /tmp/sclo-results-XXXXXX)
for tst in $(cat ${THISDIR}/enabled_tests|grep -v '^#')
do
    resDir="$resDirAll/$tst"
    mkdir -p "$resDir"

    ${THISDIR}/$tst/run.sh \
            2> >(tee "$resDir/err" | sed 's/^/\t/' >$out) \
            > >(tee "$resDir/out" | sed 's/^/\t/' >$out)
    retcode=$?

    echo "$retcode" >"$resDir/retcode"

    # check retcode
    if [ -f "$tst/retcode" ]
    then
        # if defined explicitly
        if echo "$retcode" | diff - "$tst/retcode" >/dev/null
        then
            state=$stPass
        else
            state=$stFail
        fi
    else
        #if not defined explicitly then 0 is expected
        if [ "$retcode" -eq "0" ]
        then
            state=$stPass
        else
            state=$stFail<commit_msg>Print name of the collection<commit_after>#!/bin/bash

THISDIR=$(dirname ${BASH_SOURCE[0]})
source ${THISDIR}/../../common/functions.sh

out=${out-/dev/null}

stPass="[PASSED]"
stFail="[FAILED]"

passed=0
failed=0

resDirAll=$(mktemp -d /tmp/sclo-results-XXXXXX)

echo "Running tests for $THISDIR ..."

for tst in $(cat ${THISDIR}/enabled_tests|grep -v '^#')
do
    resDir="$resDirAll/$tst"
    mkdir -p "$resDir"

    ${THISDIR}/$tst/run.sh \
            2> >(tee "$resDir/err" | sed 's/^/\t/' >$out) \
            > >(tee "$resDir/out" | sed 's/^/\t/' >$out)
    retcode=$?

    echo "$retcode" >"$resDir/retcode"

    # check retcode
    if [ -f "$tst/retcode" ]
    then
        # if defined explicitly
        if echo "$retcode" | diff - "$tst/retcode" >/dev/null
        then
            state=$stPass
        else
            state=$stFail
        fi
    else
        #if not defined explicitly then 0 is expected
        if [ "$retcode" -eq "0" ]
        then
            state=$stPass
        else
            state=$stFail
{'fraction_non_alphanumeric': 0.1752115480338477, 'fraction_numerical': 0.005973120955699353, 'mean_word_length': 2.0271084337349397, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, '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': '7227822', 'n_tokens_mistral': 753, 'n_tokens_neox': 718, 'n_words': 162}