summaryrefslogtreecommitdiffstats
path: root/test/test_sparse_vec.py
blob: 0cc1a76ed56316fe4e550698ebecc7db0bb66106 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/env python

import unittest

from framework import VppTestCase, VppTestRunner
from vpp_ip_route import VppIpTable, VppIpRoute, VppRoutePath


class TestSparseVec(VppTestCase):
    """ SparseVec Test Cases """

    @classmethod
    def setUpClass(cls):
        super(TestSparseVec, cls).setUpClass()

    @classmethod
    def tearDownClass(cls):
        super(TestSparseVec, cls).tearDownClass()

    def setUp(self):
        super(TestSparseVec, self).setUp()

    def tearDown(self):
        super(TestSparseVec, self).tearDown()

    def test_string_unittest(self):
        """ SparseVec unit tests """
        error = self.vapi.cli("test sparse_vec")
        if error.find("failed") != -1:
            self.logger.critical("FAILURE in the sparse_vec test")
        self.assertNotIn("failed", error)

if __name__ == '__main__':
    unittest.main(testRunner=VppTestRunner)
$$(hostname) # update version.h only when version changes, to avoid # unnecessary re-linking of vpp binary .version: @if [ "$$(cat .version 2> /dev/null)" != "$(VPP_VERSION)" ] ; then \ f="vpp/app/version.h" ;\ echo " VERSION $$f ($(VPP_VERSION))" ;\ echo $(VPP_VERSION) > .version ;\ echo "#define VPP_BUILD_DATE \"$(VPP_BUILD_DATE)\"" > $$f ;\ echo "#define VPP_BUILD_USER \"$(VPP_BUILD_USER)\"" >> $$f ;\ echo "#define VPP_BUILD_HOST \"$(VPP_BUILD_HOST)\"" >> $$f ;\ echo -n "#define VPP_BUILD_TOPDIR " >> $$f ;\ echo "\"$$(cd $(srcdir) && git rev-parse --show-toplevel)\"" >> $$f ;\ echo "#define VPP_BUILD_VER \"$(VPP_VERSION)\"" >> $$f ;\ fi bin_vpp_LDADD = \ libvlibmemory.la \ libvlib.la \ libvnet.la \ libsvm.la \ libsvmdb.la \ libvppinfra.la \ -lrt -lm -lpthread -ldl bin_vpp_LDFLAGS = -Wl,--export-dynamic bin_PROGRAMS += bin/vppctl bin_vppctl_SOURCES = vpp/app/vppctl.c bin_vppctl_LDADD = libvppinfra.la if ENABLE_TESTS noinst_PROGRAMS += bin/test_client bin_test_client_SOURCES = \ vpp/api/test_client.c bin_test_client_LDADD = \ libvlibmemoryclient.la \ libsvm.la \ libvppinfra.la \ -lpthread -lm -lrt noinst_PROGRAMS += bin/test_client bin/test_ha bin_test_ha_SOURCES = \ vpp/api/test_ha.c bin_test_ha_LDADD = \ libvlibmemoryclient.la \ libsvm.la \ libvppinfra.la \ -lpthread -lm -lrt endif noinst_PROGRAMS += bin/summary_stats_client bin_summary_stats_client_SOURCES = \ vpp/api/summary_stats_client.c bin_summary_stats_client_LDADD = \ libvlibmemoryclient.la \ libsvm.la \ libvppinfra.la \ -lpthread -lm -lrt bin_PROGRAMS += bin/vpp_get_metrics bin_vpp_get_metrics_SOURCES = \ vpp/api/vpp_get_metrics.c bin_vpp_get_metrics_LDADD = \ libsvmdb.la \ libsvm.la \ libvppinfra.la \ -lpthread -lm -lrt CLEANFILES += vpp/app/version.h # vi:syntax=automake