diff options
author | Filip Tehlar <ftehlar@cisco.com> | 2016-09-07 15:47:47 +0200 |
---|---|---|
committer | Filip Tehlar <ftehlar@cisco.com> | 2016-09-12 14:41:10 +0200 |
commit | bf231ba795387064e7c4f1781240619429a4ef29 (patch) | |
tree | 86da34369910ca1c85672ed30d4374d4ecda9ac3 /tests/data_plane/vpp_lite_topo/run.sh | |
parent | 1df1d674eaace35d52973786403eb1dbe3c0d5eb (diff) |
Introduce an option for testing binary API
This patch introduces an option for choosing a configuration method in
tests. Supported methods are VAT and vpp's debug CLI.
* Added new aprameter to run.sh to define method (--cfg-method [vat|cli]).
Defaults to vat.
* When running a test separately the method can be set as follows:
$ sudo CFG_METHOD=cli ./tests/<test_case>.sh
Again, it defaults to 'vat' if not provided.
* Increased readability in test driver scripts when checking test
status
* When debugging you can stop test execution by running the test with WAIT=1:
$ sudo WAIT=1 tests/<test_case>.sh
Change-Id: If851139cff072ba2e3b3594a3345763d360f3b59
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo/run.sh')
-rwxr-xr-x | tests/data_plane/vpp_lite_topo/run.sh | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/tests/data_plane/vpp_lite_topo/run.sh b/tests/data_plane/vpp_lite_topo/run.sh index d51b552..f57e4a2 100755 --- a/tests/data_plane/vpp_lite_topo/run.sh +++ b/tests/data_plane/vpp_lite_topo/run.sh @@ -1,6 +1,5 @@ #!/usr/bin/env bash -source config.sh source odl_utils.sh TESTS_DIR=tests @@ -11,13 +10,17 @@ function help echo echo This must be run with superuser privileges. echo "Usage:" - echo " ./run.sh [vhc]" + echo " ./run.sh [vhc] [--config-method vat|cli]" echo echo " -v : verbose output" echo " -c : clean" echo " -h : show help" + echo " --config-method : select configuration method. Default is VAT." } +export CFG_METHOD=vat +source config.sh + verbose=0 while [ $# -gt 0 ] ; do @@ -32,6 +35,19 @@ while [ $# -gt 0 ] ; do elif [ $arg == "-c" ] ; then clean_all exit 0 + elif [ $arg == "--config-method" ] ; then + type=$1 + shift + if [ $type != "vat" -a $type != "cli" ] ; then + echo "ERROR: expected one of 'cli' or 'vat' " + help + exit 1 + fi + export CFG_METHOD=$type + else + echo "parse error" + help + exit 1 fi done @@ -60,6 +76,8 @@ test_num=`ls -l "$TESTS_DIR"/test_* | wc -l` echo echo "Running VPP lite test suite." echo +echo "Config method: $CFG_METHOD" +echo for test_case in "$TESTS_DIR"/test_* do |