5 # Copyright(c) 2010-2012 Intel Corporation. All rights reserved.
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions
12 # * Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
14 # * Redistributions in binary form must reproduce the above copyright
15 # notice, this list of conditions and the following disclaimer in
16 # the documentation and/or other materials provided with the
18 # * Neither the name of Intel Corporation nor the names of its
19 # contributors may be used to endorse or promote products derived
20 # from this software without specific prior written permission.
22 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 # version: DPDK.L.1.2.3-3
36 # script to check that dependancies are working in the framework
37 # must be executed from root
40 make config T=x86_64-default-linuxapp-gcc O=deptest
43 MOD_APP_TEST1=`stat deptest/app/test | grep Modify`
44 MOD_APP_TEST_MEMPOOL1=`stat deptest/build/app/test/test_mempool.o | grep Modify`
45 MOD_LIB_MEMPOOL1=`stat deptest/lib/librte_mempool.a | grep Modify`
46 MOD_LIB_MBUF1=`stat deptest/lib/librte_mbuf.a | grep Modify`
48 echo "----- touch mempool.c, and check that deps are updated"
50 touch lib/librte_mempool/rte_mempool.c
53 MOD_APP_TEST2=`stat deptest/app/test | grep Modify`
54 MOD_APP_TEST_MEMPOOL2=`stat deptest/build/app/test/test_mempool.o | grep Modify`
55 MOD_LIB_MEMPOOL2=`stat deptest/lib/librte_mempool.a | grep Modify`
56 MOD_LIB_MBUF2=`stat deptest/lib/librte_mbuf.a | grep Modify`
58 if [ "${MOD_APP_TEST1}" = "${MOD_APP_TEST2}" ]; then
59 echo ${MOD_APP_TEST1} / ${MOD_APP_TEST2}
60 echo "Bad deps on deptest/app/test"
63 if [ "${MOD_APP_TEST_MEMPOOL1}" != "${MOD_APP_TEST_MEMPOOL2}" ]; then
64 echo "Bad deps on deptest/build/app/test/test_mempool.o"
67 if [ "${MOD_LIB_MEMPOOL1}" = "${MOD_LIB_MEMPOOL2}" ]; then
68 echo "Bad deps on deptest/lib/librte_mempool.a"
71 if [ "${MOD_LIB_MBUF1}" != "${MOD_LIB_MBUF2}" ]; then
72 echo "Bad deps on deptest/lib/librte_mbuf.a"
76 echo "----- touch mempool.h, and check that deps are updated"
78 touch lib/librte_mempool/rte_mempool.h
81 MOD_APP_TEST3=`stat deptest/app/test | grep Modify`
82 MOD_APP_TEST_MEMPOOL3=`stat deptest/build/app/test/test_mempool.o | grep Modify`
83 MOD_LIB_MEMPOOL3=`stat deptest/lib/librte_mempool.a | grep Modify`
84 MOD_LIB_MBUF3=`stat deptest/lib/librte_mbuf.a | grep Modify`
86 if [ "${MOD_APP_TEST2}" = "${MOD_APP_TEST3}" ]; then
87 echo "Bad deps on deptest/app/test"
90 if [ "${MOD_APP_TEST_MEMPOOL2}" = "${MOD_APP_TEST_MEMPOOL3}" ]; then
91 echo "Bad deps on deptest/build/app/test/test_mempool.o"
94 if [ "${MOD_LIB_MEMPOOL2}" = "${MOD_LIB_MEMPOOL3}" ]; then
95 echo "Bad deps on deptest/lib/librte_mempool.a"
98 if [ "${MOD_LIB_MBUF2}" = "${MOD_LIB_MBUF3}" ]; then
99 echo "Bad deps on deptest/lib/librte_mbuf.a"
104 echo "----- change mempool.c's CFLAGS, and check that deps are updated"
106 make -j8 O=deptest CFLAGS_rte_mempool.o="-DDUMMY_TEST"
108 MOD_APP_TEST4=`stat deptest/app/test | grep Modify`
109 MOD_APP_TEST_MEMPOOL4=`stat deptest/build/app/test/test_mempool.o | grep Modify`
110 MOD_LIB_MEMPOOL4=`stat deptest/lib/librte_mempool.a | grep Modify`
111 MOD_LIB_MBUF4=`stat deptest/lib/librte_mbuf.a | grep Modify`
113 if [ "${MOD_APP_TEST3}" = "${MOD_APP_TEST4}" ]; then
114 echo "Bad deps on deptest/app/test"
117 if [ "${MOD_APP_TEST_MEMPOOL3}" != "${MOD_APP_TEST_MEMPOOL4}" ]; then
118 echo "Bad deps on deptest/build/app/test/test_mempool.o"
121 if [ "${MOD_LIB_MEMPOOL3}" = "${MOD_LIB_MEMPOOL4}" ]; then
122 echo "Bad deps on deptest/lib/librte_mempool.a"
125 if [ "${MOD_LIB_MBUF3}" != "${MOD_LIB_MBUF4}" ]; then
126 echo "Bad deps on deptest/lib/librte_mbuf.a"
131 echo "----- Deps check ok"