<commit_before>unset STREAMS_DOMAIN_ID
unset STREAMS_INSTANCE_ID
unset VCAP_SERVICES
unset STREAMING_ANALYTICS_SERVICE_NAME

set -x

# Clean the extracted toolkits to avoid artifacts from
# previous runs with different Python versions.
cd $WORKSPACE/test/python/spl
find . -name 'toolkit.xml' | xargs rm

cd $WORKSPACE/test/python
pyv=`$PYTHONHOME/bin/python -c 'import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))'`
now=`date +%Y%m%d%H%M%S`
xuf="nose_runs/TEST-PY${pyv}_${now}.xml"
export PYTHONPATH=${PYTHONPATH}:${WORKSPACE}/test/python/topology:${WORKSPACE}/test/python/spl/tests:

wd="$WORKSPACE/test/python/nose_runs/py${pyv}"
mkdir -p ${wd}
nosetests --where=${wd} --xunit-file ${xuf} --xunit-testsuite-name="py${pyv}" --config=nose.cfg ../../topology ../../spl/tests
<commit_msg>Selective about which toolkits to clean<commit_after>unset STREAMS_DOMAIN_ID
unset STREAMS_INSTANCE_ID
unset VCAP_SERVICES
unset STREAMING_ANALYTICS_SERVICE_NAME

set -x

# Clean the extracted toolkits to avoid artifacts from
# previous runs with different Python versions.
cd $WORKSPACE/test/python/spl
find testtkpy* -name 'toolkit.xml' | xargs rm

cd $WORKSPACE/test/python
pyv=`$PYTHONHOME/bin/python -c 'import sys; print(str(sys.version_info.major)+str(sys.version_info.minor))'`
now=`date +%Y%m%d%H%M%S`
xuf="nose_runs/TEST-PY${pyv}_${now}.xml"
export PYTHONPATH=${PYTHONPATH}:${WORKSPACE}/test/python/topology:${WORKSPACE}/test/python/spl/tests:

wd="$WORKSPACE/test/python/nose_runs/py${pyv}"
mkdir -p ${wd}
nosetests --where=${wd} --xunit-file ${xuf} --xunit-testsuite-name="py${pyv}" --config=nose.cfg ../../topology ../../spl/tests

{'fraction_non_alphanumeric': 0.1656590084643289, 'fraction_numerical': 0.0, 'mean_word_length': 5.755102040816326, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '201734', 'n_tokens_mistral': 648, 'n_tokens_neox': 637, 'n_words': 116}