<commit_before>#!/bin/bash
#
# Script to run tests on Travis-CI.
#
# This file is generated by l2tdevtools update-dependencies.py, any dependency
# related changes should be made in dependencies.ini.

# Exit on error.
set -e;

if test "${TARGET}" = "jenkins";
then
	./config/jenkins/linux/run_end_to_end_tests.sh "travis";

elif test "${TARGET}" = "pylint";
then
	pylint --version

	for FILE in `find setup.py config dftimewolf tests -name \*.py`;
	do
		echo "Checking: ${FILE}";

		pylint --rcfile=.pylintrc ${FILE};
	done

elif test "${TRAVIS_OS_NAME}" = "osx";
then
	PYTHONPATH=/Library/Python/2.7/site-packages/ /usr/bin/python ./run_tests.py;

	python ./setup.py build

	python ./setup.py sdist

	python ./setup.py bdist

	if test -f tests/end-to-end.py;
	then
		PYTHONPATH=. python ./tests/end-to-end.py --debug -c config/end-to-end.ini;
	fi

elif test -n "${FEDORA_VERSION}";
then
	CONTAINER_NAME="fedora${FEDORA_VERSION}";

	docker exec "${CONTAINER_NAME}" sh -c "git clone https://github.com/log2timeline/dftimewolf.git";

	if test ${TRAVIS_PYTHON_VERSION} = "2.7";
	then
		docker exec "${CONTAINER_NAME}" sh -c "cd dftimewolf && python2 run_tests.py";
	else
		docker exec "${CONTAINER_NAME}" sh -c "cd dftimewolf && python3 run_tests.py";
	fi

elif test "${TRAVIS_OS_NAME}" = "linux";
then
	if test -n "${TOXENV}";
	then
		tox --sitepackages ${TOXENV};

	elif test "${TRAVIS_PYTHON_VERSION}" = "2.7";
	then
		coverage erase
		coverage run --source=dftimewolf --omit="*_test*,*__init__*,*test_lib*" ./run_tests.py
	else
		python ./run_tests.py

		python ./setup.py build

		python ./setup.py sdist

		python ./setup.py bdist

		TMPDIR="${PWD}/tmp";
		TMPSITEPACKAGES="${TMPDIR}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages";

		mkdir -p ${TMPSITEPACKAGES};

		PYTHONPATH=${TMPSITEPACKAGES} python ./setup.py install --prefix=${TMPDIR};

		if test -f tests/end-to-end.py;
		then
			PYTHONPATH=. python ./tests/end-to-end.py --debug -c config/end-to-end.ini;
		fi
	fi
fi
<commit_msg>Changed linter CI tests to not stop after first failure (#191)<commit_after>#!/bin/bash
#
# Script to run tests on Travis-CI.
#
# This file is generated by l2tdevtools update-dependencies.py, any dependency
# related changes should be made in dependencies.ini.

# Exit on error.
set -e;

if test "${TARGET}" = "jenkins";
then
	./config/jenkins/linux/run_end_to_end_tests.sh "travis";

elif test "${TARGET}" = "pylint";
then
	pylint --version
	pylint --rcfile=.pylintrc setup.py dftimewolf tests

elif test "${TRAVIS_OS_NAME}" = "osx";
then
	PYTHONPATH=/Library/Python/2.7/site-packages/ /usr/bin/python ./run_tests.py;

	python ./setup.py build

	python ./setup.py sdist

	python ./setup.py bdist

	if test -f tests/end-to-end.py;
	then
		PYTHONPATH=. python ./tests/end-to-end.py --debug -c config/end-to-end.ini;
	fi

elif test -n "${FEDORA_VERSION}";
then
	CONTAINER_NAME="fedora${FEDORA_VERSION}";

	docker exec "${CONTAINER_NAME}" sh -c "git clone https://github.com/log2timeline/dftimewolf.git";

	if test ${TRAVIS_PYTHON_VERSION} = "2.7";
	then
		docker exec "${CONTAINER_NAME}" sh -c "cd dftimewolf && python2 run_tests.py";
	else
		docker exec "${CONTAINER_NAME}" sh -c "cd dftimewolf && python3 run_tests.py";
	fi

elif test "${TRAVIS_OS_NAME}" = "linux";
then
	if test -n "${TOXENV}";
	then
		tox --sitepackages ${TOXENV};

	elif test "${TRAVIS_PYTHON_VERSION}" = "2.7";
	then
		coverage erase
		coverage run --source=dftimewolf --omit="*_test*,*__init__*,*test_lib*" ./run_tests.py
	else
		python ./run_tests.py

		python ./setup.py build

		python ./setup.py sdist

		python ./setup.py bdist

		TMPDIR="${PWD}/tmp";
		TMPSITEPACKAGES="${TMPDIR}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages";

		mkdir -p ${TMPSITEPACKAGES};

		PYTHONPATH=${TMPSITEPACKAGES} python ./setup.py install --prefix=${TMPDIR};

		if test -f tests/end-to-end.py;
		then
			PYTHONPATH=. python ./tests/end-to-end.py --debug -c config/end-to-end.ini;
		fi
	fi
fi

{'fraction_non_alphanumeric': 0.1573346845705599, 'fraction_numerical': 0.005827210539650367, 'mean_word_length': 3.7509025270758123, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1846326', 'n_tokens_mistral': 1631, 'n_tokens_neox': 1501, 'n_words': 375}