<commit_before>#!/bin/bash
export OOC_LIBS=$(dirname `pwd`)
ARGS=""
TESTS_USE_FILE="tests.use"
if [ -e rock_arguments.txt ]
	then
		ARGS=$(cat rock_arguments.txt)
fi
FLAGS=${@:2}
TESTS=$@
case "$1" in
	"nogpu")
		;&
	"")
		;&
	"all")
		TESTS="./test"
		;;
	*)
		TESTS="./test/$1"
		;;
esac
if [[ -d $TESTS ]]
then
	TESTS=$(find $TESTS -name "*Test.ooc")
else
	TESTS=$TESTS"Test.ooc"
fi
echo "SourcePath: ." > "$TESTS_USE_FILE"
for TEST in $TESTS
do
	if [[ !( $1 == "nogpu" && $TEST == *"/gpu/"* ) ]]
	then
		echo "Imports: ${TEST%.*}" >> "$TESTS_USE_FILE"
	fi
done
echo "Main: ./test/Tests.ooc" >> "$TESTS_USE_FILE"
rm .libs/tests-linux64.*
rock -q -lpthread --gc=off $ARGS $FLAGS $TESTS_USE_FILE 2>&1
./Tests
if [[ !( $? == 0 ) ]]
then
	exit 1
else
	exit 0
fi<commit_msg>Improved test script.<commit_after>#!/bin/bash
export OOC_LIBS=$(dirname `pwd`)
ARGS=""
TESTS_USE_FILE="tests.use"
if [ -e rock_arguments.txt ]
	then
		ARGS=$(cat rock_arguments.txt)
fi
FLAGS=${@:2}
TESTS=$@
case "$1" in
	"nogpu")
		;&
	"")
		;&
	"all")
		TESTS="./test"
		;;
	*)
		TESTS="./test/$1"
		;;
esac
if [[ -d $TESTS ]]
then
	TESTS=$(find $TESTS -name "*Test.ooc")
else
	TESTS=$TESTS"Test.ooc"
fi
echo "SourcePath: ." > "$TESTS_USE_FILE"
for TEST in $TESTS
do
	if [[ !( $1 == "nogpu" && $TEST == *"/gpu/"* ) ]]
	then
		echo "Imports: ${TEST%.*}" >> "$TESTS_USE_FILE"
	fi
done
echo "Main: ./test/Tests.ooc" >> "$TESTS_USE_FILE"
rm -f .libs/tests-linux64.*
rock --allerrors -q -lpthread --gc=off $ARGS $FLAGS $TESTS_USE_FILE && ./Tests
if [[ !( $? == 0 ) ]]
then
	exit 1
else
	exit 0
fi
{'fraction_non_alphanumeric': 0.23130990415335465, 'fraction_numerical': 0.012779552715654952, 'mean_word_length': 3.6194690265486726, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 14, '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': '6102903', 'n_tokens_mistral': 730, 'n_tokens_neox': 705, 'n_words': 158}