Skip to content

Commit

Permalink
Set locale to keep python read() happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
gizmoguy committed Aug 23, 2018
1 parent 34f6dc6 commit e82e64d
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docker/runtests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ locale-gen en_US.UTF-8 || exit 1
if [ "$UNITTESTS" == 1 ] ; then
echo "========== Running faucet unit tests =========="
cd /faucet-src/tests
./run_unit_tests.sh || exit 1
LANG=en_US.UTF-8 LANGUAGE=en_US.en LC_ALL=en_US.UTF-8 ./run_unit_tests.sh || exit 1
fi

if [ "$DEPCHECK" == 1 ] ; then
Expand Down
32 changes: 32 additions & 0 deletions travis/run-integration-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash

if [ "${MATRIX_SHARD}" = "sanity" ] ; then
FAUCET_TESTS="-u FaucetSanityTest"
./tests/run_unit_tests.sh || exit 1
codecov || true
else
ALLTESTFILES="tests/integration/mininet_tests.py clib/clib_mininet_tests.py"
ALLTESTS=`grep -E -o "^class (Faucet[a-zA-Z0-9]+Test)" ${ALLTESTFILES}|cut -f2 -d" "|sort`
declare -A sharded

function shard {
work=$1
workers=$2
i=0
for shard in $work ; do
i=$(expr $i % $workers)
sharded[$i]="${sharded[$i]} $shard"
i=$(expr $i + 1)
done
}

shard "$ALLTESTS" ${MATRIX_SHARDS}
FAUCET_TESTS="-i ${sharded[${MATRIX_SHARD}]}"
fi

echo Shard $MATRIX_SHARD: $FAUCETTESTS
sudo docker run --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 \
-v $HOME/.cache/pip:/var/tmp/pip-cache \
-e FAUCET_TESTS="${FAUCET_TESTS}" \
-t ${FAUCET_TEST_IMG} || exit 1
exit 0

0 comments on commit e82e64d

Please sign in to comment.