<commit_before>#!/bin/bash
#BUILD_DIR=${BUILD_DIR:=$HOME/raven_libs/build}
#INSTALL_DIR=${INSTALL_DIR:=$HOME/raven_libs/pylibs}
PYTHON_CMD=${PYTHON_CMD:=python}
JOBS=${JOBS:=1}

SCRIPT_DIRNAME=`dirname $0`
SCRIPT_DIR=`(cd $SCRIPT_DIRNAME; pwd)`
ORIGPYTHONPATH="$PYTHONPATH"

#update_python_path ()
#{
#    if ls -d $INSTALL_DIR/*/python*/site-packages/
#    then
#        export PYTHONPATH=`ls -d $INSTALL_DIR/*/python*/site-packages/`:"$ORIGPYTHONPATH"
#    fi
#}

#update_python_path
#PATH=$INSTALL_DIR/bin:$PATH


cd tests/framework

for I in $(python ${SCRIPT_DIR}/developer_tools/get_coverage_tests.py)
do
    echo Validating $I
    xmllint --noout --schema ../../raven.xsd $I
done

<commit_msg>Keep track of the number of passed and failed tests.<commit_after>#!/bin/bash
#BUILD_DIR=${BUILD_DIR:=$HOME/raven_libs/build}
#INSTALL_DIR=${INSTALL_DIR:=$HOME/raven_libs/pylibs}
PYTHON_CMD=${PYTHON_CMD:=python}
JOBS=${JOBS:=1}

SCRIPT_DIRNAME=`dirname $0`
SCRIPT_DIR=`(cd $SCRIPT_DIRNAME; pwd)`
ORIGPYTHONPATH="$PYTHONPATH"


cd tests/framework

failed_tests=0
passed_tests=0

for I in $(python ${SCRIPT_DIR}/developer_tools/get_coverage_tests.py)
do
    echo Validating $I
    xmllint --noout --schema ../../raven.xsd $I
    if test $? -eq 0;
    then
        passed_tests=$(($passed_tests + 1))
    else
        failed_tests=$(($failed_tests + 1))
    fi
done
echo Passed $passed_tests Failed $failed_tests
exit $failed_tests



{'fraction_non_alphanumeric': 0.15583508036338226, 'fraction_numerical': 0.006289308176100629, 'mean_word_length': 4.868852459016393, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '6134459', 'n_tokens_mistral': 608, 'n_tokens_neox': 555, 'n_words': 98}