<commit_before>#!/bin/bash

set -o pipefail

log() {
    echo "========> ($(date -u --rfc-3339=seconds)) $@"
}

wait_startup() {
    count=0
    while true; do
        log "Waiting for host ZK to be up (count:$count)"
        { echo "ruok" | nc localhost 2181 | grep -q 'imok'; } && break
        count=$((count+1))
        if [ $count -gt 20 ]; then
            log "Host ZK failed to come up within 1 minute"
            exit 1
        fi
        sleep 3
    done
    log "Host ZK up"
}

shutdown() {
    log "Scion status:"
    ./scion.sh status
    log "Stopping scion"
    ./scion.sh stop | grep -v "STOPPED"
    log "Scion stopped"
    exit $result
}


log "Starting scion"
./scion.sh run | grep -v "RUNNING"
log "Scion status:"
./scion.sh status || exit 1

log "End2end starting:"
( cd test/integration; PYTHONPATH=../../ python3 end2end_test.py; )
result=$?
if [ $result -eq 0 ]; then
    log "End2end: success"
else
    log "End2end: failure"
    shutdown
fi

log "Bandwidth starting:"
( cd test/integration; PYTHONPATH=../../ python3 bandwidth_test.py; )
result=$?
if [ $result -eq 0 ]; then
    log "Bandwidth: success"
else
    # As this test is very flaky on circleci, don't treat failure as an error.
    result=0
    log "Bandwidth: failure"
fi

shutdown
<commit_msg>dropping bw test<commit_after>#!/bin/bash

set -o pipefail

log() {
    echo "========> ($(date -u --rfc-3339=seconds)) $@"
}

wait_startup() {
    count=0
    while true; do
        log "Waiting for host ZK to be up (count:$count)"
        { echo "ruok" | nc localhost 2181 | grep -q 'imok'; } && break
        count=$((count+1))
        if [ $count -gt 20 ]; then
            log "Host ZK failed to come up within 1 minute"
            exit 1
        fi
        sleep 3
    done
    log "Host ZK up"
}

shutdown() {
    log "Scion status:"
    ./scion.sh status
    log "Stopping scion"
    ./scion.sh stop | grep -v "STOPPED"
    log "Scion stopped"
    exit $result
}


log "Starting scion"
./scion.sh run | grep -v "RUNNING"
log "Scion status:"
./scion.sh status || exit 1

log "End2end starting:"
( cd test/integration; PYTHONPATH=../../ python3 end2end_test.py; )
result=$?
if [ $result -eq 0 ]; then
    log "End2end: success"
else
    log "End2end: failure"
    shutdown
fi

shutdown

{'fraction_non_alphanumeric': 0.14197802197802198, 'fraction_numerical': 0.02065934065934066, 'mean_word_length': 2.327485380116959, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '4301871', 'n_tokens_mistral': 859, 'n_tokens_neox': 806, 'n_words': 271}