diff options
author | 2016-08-30 14:49:58 +0200 | |
---|---|---|
committer | 2016-08-31 09:04:50 +0200 | |
commit | 1df1d674eaace35d52973786403eb1dbe3c0d5eb (patch) | |
tree | 39546a92cb3715a957fe44f9318ae3a2cc3718bb /tests/data_plane/vpp_lite_topo | |
parent | 4543d2821b1ab69579a525d83497ff84e9084bed (diff) |
Use VAT in testsstable/1609
Change-Id: If8f08c5e998c5fbd9ea5c1f0252a77e01ea347ec
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
Diffstat (limited to 'tests/data_plane/vpp_lite_topo')
10 files changed, 51 insertions, 0 deletions
diff --git a/tests/data_plane/vpp_lite_topo/config.sh b/tests/data_plane/vpp_lite_topo/config.sh index 1fa060a..e4c3283 100644 --- a/tests/data_plane/vpp_lite_topo/config.sh +++ b/tests/data_plane/vpp_lite_topo/config.sh @@ -5,6 +5,7 @@ ODL_PORT="8181" # path to vpp executable VPP_LITE_BIN=/vpp/build-root/install-vpp_lite_debug-native/vpp/bin/vpp +VPP_API_TEST=/vpp/build-root/install-vpp_lite_debug-native/vpp-api-test/bin/vpp_api_test # read user config file if exists if [ -f "${HOME}/.onerc" ] ; then @@ -18,6 +19,16 @@ if [ ! -f "${VPP_LITE_BIN}" ] ; then exit 1 fi +if [ ! -f "${VPP_API_TEST}" ] ; then + echo "Error: vpp_api_test not found. Either it's not built or environment \ + variable VPP_API_TEST is not set. You can build vpp_api_test with:" + echo "$ make build-vat" + echo "VPP_API_TEST can be set in config.sh or in ~/.onerc." + echo "Current value:" + echo "VPP_LITE_BIN=${VPP_API_TEST}" + exit 1 +fi + function clean_all { echo "Clearing all VPP instances.." diff --git a/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh b/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh index 4a57c58..09b8e24 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/basic_topo.sh @@ -95,6 +95,10 @@ function basic_topo_setup exec ${VPP_LITE_CONF}/vpp2.config } \ api-trace { on } api-segment {prefix xtr2} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + if [ "$1" != "no_odl" ] ; then post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} diff --git a/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh b/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh index 3b6fee3..9066a74 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/basic_topo_l2.sh @@ -102,6 +102,10 @@ function basic_topo_setup exec ${VPP_LITE_CONF}/vpp2.config } \ api-trace { on } api-segment {prefix xtr2} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + if [ "$1" != "no_odl" ] ; then post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} diff --git a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh index 3d493f0..85f2f90 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo.sh @@ -116,6 +116,10 @@ function multihoming_topo_setup exec ${VPP_LITE_CONF}/vpp2.config } \ api-trace { on } api-segment {prefix xtr2} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + if [ "$1" != "no_odl" ] ; then post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} diff --git a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh index bd490c0..308f375 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/multihoming_topo_l2.sh @@ -123,6 +123,10 @@ function multihoming_topo_setup exec ${VPP_LITE_CONF}/vpp2.config } \ api-trace { on } api-segment {prefix xtr2} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + if [ "$1" != "no_odl" ] ; then post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} diff --git a/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh b/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh index b6530e7..c740a17 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/rtr_single_iface.sh @@ -97,6 +97,11 @@ function rtr_single_iface_setup { exec ${VPP_LITE_CONF}/rtr.config } \ api-trace { on } api-segment {prefix rtr} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat + post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} } diff --git a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh index 9f5d856..69306bb 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface.sh @@ -129,6 +129,11 @@ function rtr_two_iface_setup { exec ${VPP_LITE_CONF}/rtr.config } \ api-trace { on } api-segment {prefix rtr} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat + post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} } diff --git a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh index ac9020d..12ab299 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/rtr_two_iface_two_customers.sh @@ -160,6 +160,11 @@ function rtr_two_iface_two_customers_setup { exec ${VPP_LITE_CONF}/rtr.config } \ api-trace { on } api-segment {prefix rtr} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat + post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} post_curl "add-mapping" ${ODL_CONFIG_FILE3} diff --git a/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh b/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh index 03e1c84..2b50cc9 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/smr_rtr_disjoint.sh @@ -133,6 +133,11 @@ function smr_rtr_disjoint_setup { exec ${VPP_LITE_CONF}/rtr.config } \ api-trace { on } api-segment {prefix rtr} + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + ${VPP_API_TEST} chroot prefix rtr script in ${VPP_LITE_CONF}/vpp3.vat + post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} } diff --git a/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh b/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh index 2f62913..2570087 100644 --- a/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh +++ b/tests/data_plane/vpp_lite_topo/topologies/two_customers_topo.sh @@ -121,6 +121,10 @@ function two_customers_topo_setup { exec ${VPP_LITE_CONF}/vpp2.config } \ api-trace { on } api-segment { prefix xtr2 } + sleep 2 + ${VPP_API_TEST} chroot prefix xtr1 script in ${VPP_LITE_CONF}/vpp1.vat + ${VPP_API_TEST} chroot prefix xtr2 script in ${VPP_LITE_CONF}/vpp2.vat + post_curl "add-mapping" ${ODL_CONFIG_FILE1} post_curl "add-mapping" ${ODL_CONFIG_FILE2} post_curl "add-mapping" ${ODL_CONFIG_FILE3} |