<commit_before>#!/bin/sh
# This script runs a full end-to-end test of docker-unikernel-runner:
#   - starts a mathopd unikernel
#   - verifies the web server is running and responding to requests
#   - kills the unikernel
# As the script is intended to run under Travis where KVM is not available,
# software emulation is used.
set -e
CID=$(docker run --detach \
    --device /dev/net/tun:/dev/net/tun \
    --cap-add NET_ADMIN \
    --publish=80 \
    unikernel-mathopd)
CPORT=$(docker port $CID 80)
echo Started ${CID}, reachable on ${CPORT}
curl http://${CPORT}/
docker rm -f $CID<commit_msg>travis-test.sh: Wait for unikernel to come up<commit_after>#!/bin/sh
# This script runs a full end-to-end test of docker-unikernel-runner:
#   - starts a mathopd unikernel
#   - verifies the web server is running and responding to requests
#   - kills the unikernel
# As the script is intended to run under Travis where KVM is not available,
# software emulation is used.
set -e
CID=$(docker run --detach \
    --device /dev/net/tun:/dev/net/tun \
    --cap-add NET_ADMIN \
    --publish=80 \
    unikernel-mathopd)
CPORT=$(docker port $CID 80)
echo Started ${CID}, listening on ${CPORT}
# Give it some time to come up
curl --retry 5 --retry-max-time 10 http://${CPORT}/
docker rm -f $CID
{'fraction_non_alphanumeric': 0.11847233047544817, 'fraction_numerical': 0.00857365549493375, 'mean_word_length': 3.1553398058252426, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2918723', 'n_tokens_mistral': 456, 'n_tokens_neox': 433, 'n_words': 160}