<commit_before>#!/bin/bash

set -e

PR_REFSPEC='+refs/pull/*:refs/remotes/origin/pr/*'

add_pr_refs() {
    if ! git config --get-all remote.origin.fetch | grep -F "$PR_REFSPEC" > /dev/null; then
        git config --add remote.origin.fetch "$PR_REFSPEC"
    fi
}

pushd go && add_pr_refs && popd
pushd minios && add_pr_refs && popd

git submodule update --init --recursive

opts=
if [ "$1" = "--fast" ]; then
    opts=--fast
fi

taskset -c "${EXECUTOR_NUMBER}" ./test.bash --setup-gopath $opts<commit_msg>Set ping test network based on Jenkins executor number<commit_after>#!/bin/bash

set -e

PR_REFSPEC='+refs/pull/*:refs/remotes/origin/pr/*'

err() {
    echo "$@" >&2
    exit 1
}

add_pr_refs() {
    if ! git config --get-all remote.origin.fetch | grep -F "$PR_REFSPEC" > /dev/null; then
        git config --add remote.origin.fetch "$PR_REFSPEC"
    fi
}

[ -n "$EXECUTOR_NUMBER" ] || err "error: EXECUTOR_NUMBER not set"

pushd go && add_pr_refs && popd
pushd minios && add_pr_refs && popd

git submodule update --init --recursive

opts=
if [ "$1" = "--fast" ]; then
    opts=--fast
fi


export TEST_PING_NETWORK="10.123.${EXECUTOR_NUMBER}.0/24"
taskset -c "${EXECUTOR_NUMBER}" ./test.bash --setup-gopath $opts
{'fraction_non_alphanumeric': 0.1681706316652994, 'fraction_numerical': 0.009844134536505332, 'mean_word_length': 3.250871080139373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 6, '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': '447306', 'n_tokens_mistral': 504, 'n_tokens_neox': 467, 'n_words': 115}