<commit_before>#!/bin/bash

set -e

function banner
{
    echo
    echo ">> $1 <<"
    echo
}

function run_server_tests
{
    banner 'Running server tests'
    server/build/$BUILD_TYPE/src/tests/core_tests
}

function run_api_tests
{
    (
        banner "Running API tests ($1)"
        export BEEFWEB_TEST_DEADBEEF_VERSION=$1
        export BEEFWEB_TEST_BUILD_TYPE=$BUILD_TYPE
        tools/deadbeef/$1/$TARGET_ARCH/deadbeef --version
        cd js/api_tests
        yarn test
    )
}


cd "$(dirname $0)/../.."
run_server_tests
run_api_tests v0.7

if [ "$TARGET_ARCH" = "x86_64" ]; then
    run_api_tests v1.8
fi<commit_msg>travis/test.sh: better test banner<commit_after>#!/bin/bash

set -e

function banner
{
    echo
    echo ">> $1 <<"
    echo
}

function run_server_tests
{
    banner 'Running server tests'
    server/build/$BUILD_TYPE/src/tests/core_tests
}

function run_api_tests
{
    (
        banner "Running API tests on deadbeef $1 $TARGET_ARCH"
        export BEEFWEB_TEST_DEADBEEF_VERSION=$1
        export BEEFWEB_TEST_BUILD_TYPE=$BUILD_TYPE
        tools/deadbeef/$1/$TARGET_ARCH/deadbeef --version
        cd js/api_tests
        yarn test
    )
}


cd "$(dirname $0)/../.."
run_server_tests
run_api_tests v0.7

if [ "$TARGET_ARCH" = "x86_64" ]; then
    run_api_tests v1.8
fi
{'fraction_non_alphanumeric': 0.1123076923076923, 'fraction_numerical': 0.02, 'mean_word_length': 2.7710144927536233, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7183908', 'n_tokens_mistral': 505, 'n_tokens_neox': 488, 'n_words': 97}