Skip to content

Commit e82e64d

Browse files
committed
Set locale to keep python read() happy.
1 parent 34f6dc6 commit e82e64d

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

docker/runtests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ locale-gen en_US.UTF-8 || exit 1
5757
if [ "$UNITTESTS" == 1 ] ; then
5858
echo "========== Running faucet unit tests =========="
5959
cd /faucet-src/tests
60-
./run_unit_tests.sh || exit 1
60+
LANG=en_US.UTF-8 LANGUAGE=en_US.en LC_ALL=en_US.UTF-8 ./run_unit_tests.sh || exit 1
6161
fi
6262

6363
if [ "$DEPCHECK" == 1 ] ; then

travis/run-integration-tests.sh

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#!/bin/bash
2+
3+
if [ "${MATRIX_SHARD}" = "sanity" ] ; then
4+
FAUCET_TESTS="-u FaucetSanityTest"
5+
./tests/run_unit_tests.sh || exit 1
6+
codecov || true
7+
else
8+
ALLTESTFILES="tests/integration/mininet_tests.py clib/clib_mininet_tests.py"
9+
ALLTESTS=`grep -E -o "^class (Faucet[a-zA-Z0-9]+Test)" ${ALLTESTFILES}|cut -f2 -d" "|sort`
10+
declare -A sharded
11+
12+
function shard {
13+
work=$1
14+
workers=$2
15+
i=0
16+
for shard in $work ; do
17+
i=$(expr $i % $workers)
18+
sharded[$i]="${sharded[$i]} $shard"
19+
i=$(expr $i + 1)
20+
done
21+
}
22+
23+
shard "$ALLTESTS" ${MATRIX_SHARDS}
24+
FAUCET_TESTS="-i ${sharded[${MATRIX_SHARD}]}"
25+
fi
26+
27+
echo Shard $MATRIX_SHARD: $FAUCETTESTS
28+
sudo docker run --privileged --sysctl net.ipv6.conf.all.disable_ipv6=0 \
29+
-v $HOME/.cache/pip:/var/tmp/pip-cache \
30+
-e FAUCET_TESTS="${FAUCET_TESTS}" \
31+
-t ${FAUCET_TEST_IMG} || exit 1
32+
exit 0

0 commit comments

Comments
 (0)