Skip to content

Commit

Permalink
lkl: skip DHCP tests if LKL_TEST_DHCP is not set
Browse files Browse the repository at this point in the history
By default, make test won't test with dhcp client.  If the environmental
variable LKL_TEST_DHCP is configured, it will be tested.

Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Feb 14, 2017
1 parent 8b39cae commit 274b5bf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ machine:
CROSS_COMPILE: $(case $CIRCLE_NODE_INDEX in 0) host='' ;; 1) host='i686-w64-mingw32-' ;; 2) host='arm-linux-androideabi-' ;; esac; echo $host)
MKARG: $(case $CIRCLE_NODE_INDEX in 0) mkarg='dpdk=yes' ;; 1) host='i686-w64-mingw32-' ;; 2) host='arm-linux-androideabi-' ;; esac; echo $mkarg)
PATH: /home/ubuntu/android-toolchain/bin:${PATH}
LKL_TEST_DHCP: 1

## Customize dependencies
dependencies:
Expand Down
2 changes: 2 additions & 0 deletions tools/lkl/scripts/lkl-jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -ex

export LKL_TEST_DHCP=1

make mrproper
cd tools/lkl
make -j4
Expand Down
4 changes: 4 additions & 0 deletions tools/lkl/tests/net.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ elif ping -c1 -w1 8.8.8.8 &>/dev/null; then
DST=8.8.8.8
fi

if [ -z $LKL_TEST_DHCP ] ; then
echo "\$LKL_TEST_DHCP is not configured. skipped dhcp client test"
else
if ! [ -z $DST ]; then
echo "== RAW socket (LKL net) tests =="
sudo ip link set dev ${IFNAME} promisc on
Expand All @@ -54,6 +57,7 @@ if ! [ -z $DST ]; then
./net-test macvtap `ls /dev/tap*` $DST dhcp
fi
fi
fi

# we disabled this DPDK test because it's unlikely possible to describe
# a generic set of commands for all environments to test with DPDK. users
Expand Down

0 comments on commit 274b5bf

Please sign in to comment.