<commit_before>#!/bin/bash

eval $(dbus-launch --sh-syntax)
echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"

# TODO: pulseaudio needs to be setup properly for PelagicontainApp.TestPulseAudioEnabled to work
pulseaudio --system &
pid=$!

./libpelagicontain/unit-test/pelagicontainLibTest \
    --gtest_filter=-PelagicontainApp.FileGatewayReadOnly:PelagicontainApp.TestPulseAudioEnabled \
    --gtest_output=xml
retval=$?

if ! kill $pid > /dev/null 2>&1 ; then
    echo "Failed to kill pulseaudio at pid $pid"
fi

return $retval<commit_msg>run-tests.sh: temporary bugfix for crashing pelagicontainLibTest on reboot<commit_after>#!/bin/bash

eval $(dbus-launch --sh-syntax)
echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS"

# TODO: pulseaudio needs to be setup properly for PelagicontainApp.TestPulseAudioEnabled to work
pulseaudio --system &
pid=$!

# BUG: The first time these tests are run after reboot/restart, it crashes. This is a workaraound that should be removed
./libpelagicontain/unit-test/pelagicontainLibTest 

./libpelagicontain/unit-test/pelagicontainLibTest \
    --gtest_filter=-PelagicontainApp.FileGatewayReadOnly:PelagicontainApp.TestPulseAudioEnabled \
    --gtest_output=xml
retval=$?

if ! kill $pid > /dev/null 2>&1 ; then
    echo "Failed to kill pulseaudio at pid $pid"
fi

exit $retval
{'fraction_non_alphanumeric': 0.09985207100591716, 'fraction_numerical': 0.0029585798816568047, 'mean_word_length': 4.8068669527897, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3982227', 'n_tokens_mistral': 477, 'n_tokens_neox': 450, 'n_words': 119}