File tree 2 files changed +33
-1
lines changed
2 files changed +33
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ locale-gen en_US.UTF-8 || exit 1
57
57
if [ " $UNITTESTS " == 1 ] ; then
58
58
echo " ========== Running faucet unit tests =========="
59
59
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
61
61
fi
62
62
63
63
if [ " $DEPCHECK " == 1 ] ; then
Original file line number Diff line number Diff line change
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
You can’t perform that action at this time.
0 commit comments