<commit_before>#!/bin/bash

set -e

cd "$(dirname "${BASH_SOURCE[0]}")"

. ./config.sh

(cd ./tls && go get ./... && go run generate_certs.go $HOSTS)

echo "Copying weave images, scripts, and certificates to hosts, and"
echo "  prefetch test images"

setup_host() {
    HOST=$1
    docker_on $HOST load -i ../weave.tar
    DANGLING_IMAGES="$(docker_on $HOST images -q -f dangling=true)"
    [ -n "$DANGLING_IMAGES" ] && docker_on $HOST rmi $DANGLING_IMAGES 1>/dev/null 2>&1 || true
    run_on $HOST mkdir -p bin
    upload_executable $HOST ../bin/docker-ns
    upload_executable $HOST ../weave
    rsync -az -e "$SSH" ./tls/ $HOST:~/tls
    for IMG in $TEST_IMAGES ; do
        docker_on $HOST inspect --format=" " $IMG >/dev/null 2>&1 || docker_on $HOST pull $IMG
    done
}

for HOST in $HOSTS; do<commit_msg>make `test/setup.sh` work under go 1.5<commit_after>#!/bin/bash

set -e

cd "$(dirname "${BASH_SOURCE[0]}")"

. ./config.sh

(cd ./tls && go get -tags netgo ./... && go run generate_certs.go $HOSTS)

echo "Copying weave images, scripts, and certificates to hosts, and"
echo "  prefetch test images"

setup_host() {
    HOST=$1
    docker_on $HOST load -i ../weave.tar
    DANGLING_IMAGES="$(docker_on $HOST images -q -f dangling=true)"
    [ -n "$DANGLING_IMAGES" ] && docker_on $HOST rmi $DANGLING_IMAGES 1>/dev/null 2>&1 || true
    run_on $HOST mkdir -p bin
    upload_executable $HOST ../bin/docker-ns
    upload_executable $HOST ../weave
    rsync -az -e "$SSH" ./tls/ $HOST:~/tls
    for IMG in $TEST_IMAGES ; do
        docker_on $HOST inspect --format=" " $IMG >/dev/null 2>&1 || docker_on $HOST pull $IMG
    done
}

for HOST in $HOSTS; do
{'fraction_non_alphanumeric': 0.15913200723327306, 'fraction_numerical': 0.009644364074743821, 'mean_word_length': 2.971291866028708, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '1492022', 'n_tokens_mistral': 667, 'n_tokens_neox': 625, 'n_words': 186}