VPP安装运行及其运行测试框架
2017-11-10 18:29
351 查看
参考:http://blog.csdn.net/shaoyunzhe/article/details/53096932
http://blog.csdn.net/a464057216/article/details/51889564
http://blog.csdn.net/wangcg123/article/details/71727965
下载地址:https://github.com/FDio/vpp/tree/master
git clone 下来
进入 vpp目录
依次执行命令
设置大页
之后就可以直接 make run 执行了。
使用 quit命令退出
但是之后要指定配置文件执行就要编译 dpdk了。
!!!在dpdk的目录下的 Makefile文件中改下配置 将 RTE_EAL_IGB_UIO 设置为y
才会有 igb_uio.ko 文件
之后加载驱动
dmesg
查看 成功没有
绑定网卡,配置文件等,具体可以参考最上面的链接,本人也是指定配置文件会出错,暂时还没搞懂
但我的目的是执行测试框架:
要执行测试框架只要 make run 可以起来就可以了
在VPP目录下执行
构建执行测试用例
就是这样的
执行 命令
可以查看更多执行命令和帮助
最重要的如何执行单个测试用例:
所有分析要看 Makefile文件
其实执行测试的是这条
构建了python的虚拟环境,然后执行 run_test 指定目录也就是 test目录。
期间遇到了很多很多的问题,比如里面的变量很多都是系统变量。开始自己设置各种问题。使用 make retest和 make test-shell可以不用设置。 对Makefile文件也不熟悉,要学习的还很多啊。
之后会具体分析测试框架
http://blog.csdn.net/a464057216/article/details/51889564
http://blog.csdn.net/wangcg123/article/details/71727965
下载地址:https://github.com/FDio/vpp/tree/master
git clone 下来
进入 vpp目录
依次执行命令
make install-dep make bootstrap make build
设置大页
mkdir /mnt/huge mount -t hugetlbfs nodev /mnt/huge echo 1024 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages cat /proc/meminfo| grep Huge
之后就可以直接 make run 执行了。
使用 quit命令退出
但是之后要指定配置文件执行就要编译 dpdk了。
!!!在dpdk的目录下的 Makefile文件中改下配置 将 RTE_EAL_IGB_UIO 设置为y
才会有 igb_uio.ko 文件
之后加载驱动
modprobe uio insmod igb_uio.ko
dmesg
查看 成功没有
绑定网卡,配置文件等,具体可以参考最上面的链接,本人也是指定配置文件会出错,暂时还没搞懂
但我的目的是执行测试框架:
要执行测试框架只要 make run 可以起来就可以了
在VPP目录下执行
make test
构建执行测试用例
就是这样的
执行 命令
make
可以查看更多执行命令和帮助
root@ubuntu:~/vpp/vpp# make Make Targets: bootstrap - prepare tree for build install-dep - install software dependencies wipe - wipe all products of debug build wipe-release - wipe all products of release build build - build debug binaries build-release - build release binaries build-coverity - build coverity artifacts rebuild - wipe and build debug binares rebuild-release - wipe and build release binares run - run debug binary run-release - run release binary debug - run debug binary with debugger debug-release - run release binary with debugger test - build and run (basic) functional tests test-debug - build and run (basic) functional tests (debug build) test-all - build and run (all) functional tests test-all-debug - build and run (all) functional tests (debug build) test-shell - enter shell with test environment test-shell-debug - enter shell with test environment (debug build) test-wipe - wipe files generated by unit tests retest - run functional tests retest-debug - run functional tests (debug build) test-help - show help on test framework run-vat - run vpp-api-test tool pkg-deb - build DEB packages pkg-rpm - build RPM packages dpdk-install-dev - install DPDK development packages ctags - (re)generate ctags database gtags - (re)generate gtags database cscope - (re)generate cscope database checkstyle - check coding style fixstyle - fix coding style doxygen - (re)generate documentation bootstrap-doxygen - setup Doxygen dependencies wipe-doxygen - wipe all generated documentation test-doc - generate documentation for test framework test-wipe-doc - wipe documentation for test framework test-cov - generate code coverage report for test framework test-wipe-cov - wipe code coverage report for test framework test-checkstyle - check PEP8 compliance for test framework Make Arguments: V=[0|1] - set build verbosity level STARTUP_CONF=<path> - startup configuration file (e.g. /etc/vpp/startup.conf) STARTUP_DIR=<path> - startup drectory (e.g. /etc/vpp) It also sets STARTUP_CONF if startup.conf file is present GDB=<path> - gdb binary to use for debugging PLATFORM=<name> - target platform. default is vpp TEST=<filter> - apply filter to test set, see test-help SAMPLE_PLUGIN=yes - in addition build/run/debug sample plugin Current Argument Values: V = STARTUP_CONF = STARTUP_DIR = /root/vpp/vpp GDB = gdb PLATFORM = vpp DPDK_VERSION = SAMPLE_PLUGIN = no root@ubuntu:~/vpp/vpp#
最重要的如何执行单个测试用例:
make test-shell python test_*.py(要执行的单个测试用例)
(virtualenv) root@ubuntu:~/vpp/vpp/test# (virtualenv) root@ubuntu:~/vpp/vpp/test# python test_ip4.py Running tests using custom test runner Active filters: file=None, class=None, function=None 10 out of 10 tests match specified filters Not running extended tests (some tests will be skipped) ============================================================================== IPv4 disabled ============================================================================== Starting IP Disabled ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ IP Disabled OK ------------------------------------------------------------------------------ ============================================================================== IPv4 Load-Balancing ============================================================================== Starting IP Load-Balancing ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ IP Load-Balancing OK ------------------------------------------------------------------------------ ============================================================================== IPv4 routes via NULL ============================================================================== Starting IP NULL route ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ IP NULL route OK ------------------------------------------------------------------------------ ============================================================================== IPv4 Subnets ============================================================================== Starting IP Sub Nets ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ IP Sub Nets OK ------------------------------------------------------------------------------ ============================================================================== IPv4 VLAN-0 ============================================================================== Starting IP VLAN-0 ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ IP VLAN-0 OK ------------------------------------------------------------------------------ ============================================================================== IPv4 Test Case ============================================================================== Starting IPv4 FIB test ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ IPv4 FIB test OK ------------------------------------------------------------------------------ ============================================================================== FIB - add/update/delete - ip4 routes ============================================================================== Starting Add 1k routes ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Add 1k routes OK ------------------------------------------------------------------------------ Starting Delete 100 routes ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Delete 100 routes OK ------------------------------------------------------------------------------ Starting Add 1k routes ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Add 1k routes OK ------------------------------------------------------------------------------ Starting Delete 1.5k routes ... ------------------------------------------------------------------------------ ------------------------------------------------------------------------------ Delete 1.5k routes OK ------------------------------------------------------------------------------
所有分析要看 Makefile文件
其实执行测试的是这条
@bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python run_tests.py -d $(TEST_DIR) $(UNITTEST_EXTRA_OPTS)"
构建了python的虚拟环境,然后执行 run_test 指定目录也就是 test目录。
期间遇到了很多很多的问题,比如里面的变量很多都是系统变量。开始自己设置各种问题。使用 make retest和 make test-shell可以不用设置。 对Makefile文件也不熟悉,要学习的还很多啊。
之后会具体分析测试框架
相关文章推荐
- 不安装.net framework框架运行.Net 程序的方法
- CentOS6.2下一步一步源代码安装OpenStack(四)glance配置、运行、测试
- 深度学习框架 Digits 3.0 安装运行
- 3分钟anaconda安装Python框架Tensorflow,1行语句测试是否成功?
- 构建基于Trac的自动测试框架(一):安装Trac
- Yii框架模拟运行脚本步骤测试
- 【深度学习】在Mac下安装深度学习框架Caffe并测试Mnist数据集
- Linux下安装redis的安装与测试运行详细解析
- Hadoop 伪分布式安装、运行测试例子
- 使用Nodejs+Protractor搭建测试环境+Protractor的安装及其遇到的问题
- CI框架(2)-安装及运行
- 不安装.net framework框架运行.Net 程序的方法(转)
- Python2.7环境Flask框架安装简明教程【已测试】
- opencv在Linux下的安装及其测试
- python的web开发框架django安装指南(已测试)
- NodeJs测试框架Mocha的安装与使用
- 不安装.net framework框架运行.Net 程序的方法
- 在Windows Azure 上运行 OpenSUSE Linux的虚拟机上安装 Mono 3.0.2, 测试ASP.NET WebAPI 失败(Mono 3.0.4上成功)
- XMPP框架 微信项目开发之XMPP配置(二)——安装配置客户端(Adium)和配置系统自带的信息程序,并对聊天进行测试
- SikuliX 1.1.0 Beta从安装到测试框架(2)