<commit_before>#!/bin/bash
#set -ev
set -e

# Clone MNE-CPP test data
git clone https://github.com/mne-tools/mne-cpp-test-data.git mne-cpp-test-data

# Set Environment variable
MNECPP_ROOT=$(pwd)

# Tests to run - TODO: find required tests automatically with grep
tests=( test_codecov test_fiff_rwr test_dipole_fit test_fiff_mne_types_io test_fiff_cov test_fiff_digitizer test_mne_msh_display_surface_set test_geometryinfo test_interpolation test_spectral_connectivity test_mne_forward_solution)

for test in ${tests[*]};
do
    echo ">> Starting $test"	
	./bin/$test

	#Find all .cpp files, cd to their folder and run gcov
	find ./libraries -type f -name "*.cpp" -execdir gcov {} \;
	#find . -name "*.cpp" -exec gcov {} \; > /dev/null
	#find . -name "*.cpp" -exec gcov -p -s ${PWD} {} \; > /dev/null

	codecov
	#codecov > /dev/null
	
    echo "<< Finished $test"
done

# Report code coverage; instead of "bash <(curl -s https://codecov.io/bash)" use python "codecov"
#codecov<commit_msg>Add docu and suppress gcov outputs<commit_after>#!/bin/bash
#set -ev
set -e

# Clone MNE-CPP test data
git clone https://github.com/mne-tools/mne-cpp-test-data.git mne-cpp-test-data

# Set Environment variable
MNECPP_ROOT=$(pwd)

# Tests to run - TODO: find required tests automatically with grep
tests=( test_codecov test_fiff_rwr test_dipole_fit test_fiff_mne_types_io test_fiff_cov test_fiff_digitizer test_mne_msh_display_surface_set test_geometryinfo test_interpolation test_spectral_connectivity test_mne_forward_solution)

for test in ${tests[*]};
do
    echo ">> Starting $test"	
	./bin/$test

	# Find all .cpp files, cd to their folder and run gcov
	find ./libraries -type f -name "*.cpp" -execdir gcov {} \; > /dev/null

	# Report code coverage; instead of "bash <(curl -s https://codecov.io/bash) use python codecov
	# Do this for every test run since codecov is able to process different uploads and will merge them as soon as the Travis job is done
	codecov
	#codecov > /dev/null
	
    echo "<< Finished $test"
done
{'fraction_non_alphanumeric': 0.11061507936507936, 'fraction_numerical': 0.0, 'mean_word_length': 4.158567774936062, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 12, 'https://': 4, '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': '6528693', 'n_tokens_mistral': 729, 'n_tokens_neox': 701, 'n_words': 219}