Skip to content
Permalink
Browse files

tests: net: all: Add more options to catch-all test

Add more Kconfig options to prj.conf file. In the future we need
to compile also in other hw than qemu_x86 in which case we need to
create separate test cases for those configurations.

Fixes #15282

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
  • Loading branch information...
jukkar committed Apr 13, 2019
1 parent 8e307a3 commit fcf392c6c81a79f0bc1e861dd24dc450ca989446
Showing with 516 additions and 19 deletions.
  1. +11 −0 tests/net/all/README.txt
  2. +46 −0 tests/net/all/check_net_options.sh
  3. +458 −18 tests/net/all/prj.conf
  4. +1 −1 tests/net/all/testcase.yaml
@@ -0,0 +1,11 @@
This test tries to enable all possible networking related config options
and build a sample application. The application is not supposed to be run
as typically the generated configuration is not usable.

The check_net_options.sh script can be used in Linux host to generate
a list of missing network related kconfig options from prj.conf file.

TODO:

* separate conflicting configuration options and create new test cases
for them
@@ -0,0 +1,46 @@
#!/bin/bash
#
# Copyright (c) 2019 Intel Corporation.
#
# SPDX-License-Identifier: Apache-2.0

if [ -z "$1" ]; then
echo "Usage: $0 <doc build directory>"
echo
echo "The parameter needs to point to a directory where Zephyr html"
echo "documentation is generated."
echo "Typically this is $ZEPHYR_BASE/doc/_build"
echo
echo "This script will generate a list of networking related Kconfig options"
echo "that are missing from prj.conf file."
exit
fi

BUILD_DIR="$1"

if [ ! -d $BUILD_DIR ]; then
echo "Directory $BUILD_DIR not found!"
exit
fi

KCONFIG_DIR=$BUILD_DIR/rst/doc/reference/kconfig

if [ ! -d $KCONFIG_DIR ]; then
echo "Kconfig documentation not found at $KCONFIG_DIR"
exit
fi

get_options()
{
cd $KCONFIG_DIR; ls CONFIG_DNS* CONFIG_NET* CONFIG_IEEE802154* | sed 's/\.rst//g'
}

get_options | while read opt
do
grep -q $opt prj.conf > /dev/null 2>&1
if [ $? -ne 0 ]; then
echo "$opt"
fi
done

echo "Total number of options : `get_options | wc -w`" > /dev/tty

0 comments on commit fcf392c

Please sign in to comment.
You can’t perform that action at this time.