5 # Copyright(c) 2010-2014 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 # script to check that dependancies are working in the framework
35 # must be executed from root
38 make config T=x86_64-native-linuxapp-gcc O=deptest
41 MOD_APP_TEST1=`stat deptest/app/test | grep Modify`
42 MOD_APP_TEST_MEMPOOL1=`stat deptest/build/app/test/test_mempool.o | grep Modify`
43 MOD_LIB_MEMPOOL1=`stat deptest/lib/librte_mempool.a | grep Modify`
44 MOD_LIB_MBUF1=`stat deptest/lib/librte_mbuf.a | grep Modify`
46 echo "----- touch mempool.c, and check that deps are updated"
48 touch lib/librte_mempool/rte_mempool.c
51 MOD_APP_TEST2=`stat deptest/app/test | grep Modify`
52 MOD_APP_TEST_MEMPOOL2=`stat deptest/build/app/test/test_mempool.o | grep Modify`
53 MOD_LIB_MEMPOOL2=`stat deptest/lib/librte_mempool.a | grep Modify`
54 MOD_LIB_MBUF2=`stat deptest/lib/librte_mbuf.a | grep Modify`
56 if [ "${MOD_APP_TEST1}" = "${MOD_APP_TEST2}" ]; then
57 echo ${MOD_APP_TEST1} / ${MOD_APP_TEST2}
58 echo "Bad deps on deptest/app/test"
61 if [ "${MOD_APP_TEST_MEMPOOL1}" != "${MOD_APP_TEST_MEMPOOL2}" ]; then
62 echo "Bad deps on deptest/build/app/test/test_mempool.o"
65 if [ "${MOD_LIB_MEMPOOL1}" = "${MOD_LIB_MEMPOOL2}" ]; then
66 echo "Bad deps on deptest/lib/librte_mempool.a"
69 if [ "${MOD_LIB_MBUF1}" != "${MOD_LIB_MBUF2}" ]; then
70 echo "Bad deps on deptest/lib/librte_mbuf.a"
74 echo "----- touch mempool.h, and check that deps are updated"
76 touch lib/librte_mempool/rte_mempool.h
79 MOD_APP_TEST3=`stat deptest/app/test | grep Modify`
80 MOD_APP_TEST_MEMPOOL3=`stat deptest/build/app/test/test_mempool.o | grep Modify`
81 MOD_LIB_MEMPOOL3=`stat deptest/lib/librte_mempool.a | grep Modify`
82 MOD_LIB_MBUF3=`stat deptest/lib/librte_mbuf.a | grep Modify`
84 if [ "${MOD_APP_TEST2}" = "${MOD_APP_TEST3}" ]; then
85 echo "Bad deps on deptest/app/test"
88 if [ "${MOD_APP_TEST_MEMPOOL2}" = "${MOD_APP_TEST_MEMPOOL3}" ]; then
89 echo "Bad deps on deptest/build/app/test/test_mempool.o"
92 if [ "${MOD_LIB_MEMPOOL2}" = "${MOD_LIB_MEMPOOL3}" ]; then
93 echo "Bad deps on deptest/lib/librte_mempool.a"
96 if [ "${MOD_LIB_MBUF2}" = "${MOD_LIB_MBUF3}" ]; then
97 echo "Bad deps on deptest/lib/librte_mbuf.a"
102 echo "----- change mempool.c's CFLAGS, and check that deps are updated"
104 make -j8 O=deptest CFLAGS_rte_mempool.o="-DDUMMY_TEST"
106 MOD_APP_TEST4=`stat deptest/app/test | grep Modify`
107 MOD_APP_TEST_MEMPOOL4=`stat deptest/build/app/test/test_mempool.o | grep Modify`
108 MOD_LIB_MEMPOOL4=`stat deptest/lib/librte_mempool.a | grep Modify`
109 MOD_LIB_MBUF4=`stat deptest/lib/librte_mbuf.a | grep Modify`
111 if [ "${MOD_APP_TEST3}" = "${MOD_APP_TEST4}" ]; then
112 echo "Bad deps on deptest/app/test"
115 if [ "${MOD_APP_TEST_MEMPOOL3}" != "${MOD_APP_TEST_MEMPOOL4}" ]; then
116 echo "Bad deps on deptest/build/app/test/test_mempool.o"
119 if [ "${MOD_LIB_MEMPOOL3}" = "${MOD_LIB_MEMPOOL4}" ]; then
120 echo "Bad deps on deptest/lib/librte_mempool.a"
123 if [ "${MOD_LIB_MBUF3}" != "${MOD_LIB_MBUF4}" ]; then
124 echo "Bad deps on deptest/lib/librte_mbuf.a"
129 echo "----- Deps check ok"