<commit_before>#!/bin/sh
#
# Copyright 2015 Telefónica I+D
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

#
# Launch testcase execution and generate reports
#
# Usage:
#     $0 [--verbose] [region ...]
#     $0 --help
#
# Options:
#     -v, --verbose	enable logging with verbose details
#     -h, --help	show this help message
#
# Regions:
#     Given by existing tests/regions/test_{region_name}.py files
#

OPTS='v(verbose)h(help)'
NAME=$(basename $0)

# nosetests options
TESTS=
NOSEOPTS="--logging-filter=TestCase --logging-level=ERROR"

# Available regions
REGIONS=$(cd tests/regions; ls test_*.py | sed 's/test_\(.*\).py/\1/g')
REGIONS_PATTERN='^\('$(echo $REGIONS | sed 's/ /\\|/g')'\)$'

# Process command line
OPTERR=
OPTSTR=$(echo :-:$OPTS | sed 's/([a-zA-Z0-9]*)//g')
OPTHLP=$(sed -n '20,/^$/ { s/$0/'$NAME'/; s/^#[ ]\?//p }' $0 | head -n -2;
	for i in $REGIONS ""; do printf "    %s\n" $i; done)
while getopts $OPTSTR OPT; do while [ -z "$OPTERR" ]; do
case $OPT in
'v')	NOSEOPTS="$NOSEOPTS --logging-level=DEBUG";;
'h')	OPTERR="$OPTHLP";;
'?')	OPTERR="Unknown option -$OPTARG";;
':')	OPTERR="Missing value for option -$OPTARG";;
'-')	OPTLONG="${OPTARG%=*}";
	OPT=$(expr $OPTS : ".*\(.\)($OPTLONG):.*" '|' '?');
	if [ "$OPT" = '?' ]; then
		OPT=$(expr $OPTS : ".*\(.\)($OPTLONG).*" '|' '?')
		OPTARG=-$OPTLONG
	else
		OPTARG=$(echo =$OPTARG | cut -d= -f3)
		[ -z "$OPTARG" ] && { OPTARG=-$OPTLONG; OPT=':'; }
	fi;
	continue;;
esac; break; done; done
shift $(expr $OPTIND - 1)<commit_msg>Add to logging messages from Nova and Neutron clients<commit_after>#!/bin/sh
#
# Copyright 2015 Telefónica I+D
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#         http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#

#
# Launch testcase execution and generate reports
#
# Usage:
#     $0 [--verbose] [region ...]
#     $0 --help
#
# Options:
#     -v, --verbose	enable logging with verbose details
#     -h, --help	show this help message
#
# Regions:
#     Given by existing tests/regions/test_{region_name}.py files
#

OPTS='v(verbose)h(help)'
NAME=$(basename $0)

# nosetests options
TESTS=
NOSEOPTS="--logging-filter=TestCase,novaclient,neutronclient --logging-level=ERROR"

# Available regions
REGIONS=$(cd tests/regions; ls test_*.py | sed 's/test_\(.*\).py/\1/g')
REGIONS_PATTERN='^\('$(echo $REGIONS | sed 's/ /\\|/g')'\)$'

# Process command line
OPTERR=
OPTSTR=$(echo :-:$OPTS | sed 's/([a-zA-Z0-9]*)//g')
OPTHLP=$(sed -n '20,/^$/ { s/$0/'$NAME'/; s/^#[ ]\?//p }' $0 | head -n -2;
	for i in $REGIONS ""; do printf "    %s\n" $i; done)
while getopts $OPTSTR OPT; do while [ -z "$OPTERR" ]; do
case $OPT in
'v')	NOSEOPTS="$NOSEOPTS --logging-level=DEBUG";;
'h')	OPTERR="$OPTHLP";;
'?')	OPTERR="Unknown option -$OPTARG";;
':')	OPTERR="Missing value for option -$OPTARG";;
'-')	OPTLONG="${OPTARG%=*}";
	OPT=$(expr $OPTS : ".*\(.\)($OPTLONG):.*" '|' '?');
	if [ "$OPT" = '?' ]; then
		OPT=$(expr $OPTS : ".*\(.\)($OPTLONG).*" '|' '?')
		OPTARG=-$OPTLONG
	else
		OPTARG=$(echo =$OPTARG | cut -d= -f3)
		[ -z "$OPTARG" ] && { OPTARG=-$OPTLONG; OPT=':'; }
	fi;
	continue;;
esac; break; done; done
shift $(expr $OPTIND - 1)
{'fraction_non_alphanumeric': 0.19898082989565638, 'fraction_numerical': 0.01019170104343606, 'mean_word_length': 3.7216494845360826, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4030772', 'n_tokens_mistral': 1547, 'n_tokens_neox': 1498, 'n_words': 451}