[Fuego] [PATCH 07/18] repair test program build script

Song Cai cais.fnst at cn.fujitsu.com
Fri Oct 13 09:45:14 UTC 2017


The program CppServer and CppClient depend on the header file config.h,
which is generate in thrift configure prin thrift process.
So add the step to build thrift library, generating config.h file.

Signed-off-by: Song Cai <cais.fnst at cn.fujitsu.com>
---
 engine/tests/Functional.thrift/fuego_test.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/engine/tests/Functional.thrift/fuego_test.sh b/engine/tests/Functional.thrift/fuego_test.sh
index 3b52b4a..da41535 100755
--- a/engine/tests/Functional.thrift/fuego_test.sh
+++ b/engine/tests/Functional.thrift/fuego_test.sh
@@ -1,6 +1,10 @@
 tarball=thrift-0.9.3.tar.gz
 
 function test_build {
+    cd git/build
+    cmake -DBUILD_COMPILER=OFF -DBUILD_LIBRARIES=ON -DBUILD_TESTING=OFF -DBUILD_EXAMPLES=OFF -DWITH_QT4=NO -DWITH_QT5=NO ..
+    make
+    cd -
     echo "#!/bin/bash
     tar zxf git.tar.gz
     cd git/tutorial
@@ -128,8 +132,8 @@ function test_run {
     tar zxf gen-cpp.tar.gz -C git/tutorial/;
     cd git/tutorial/cpp
     CPPFILES="../gen-cpp/shared_types.cpp ../gen-cpp/tutorial_types.cpp ../gen-cpp/tutorial_constants.cpp ../gen-cpp/Calculator.cpp ../gen-cpp/SharedService.cpp"
-    ${CXX} CppServer.cpp ${CPPFILES} -o CppServer -I../../lib/cpp/src/ -lthrift
-    ${CXX} CppClient.cpp ${CPPFILES} -o CppClient -I../../lib/cpp/src/ -lthrift
+    ${CXX} CppServer.cpp ${CPPFILES} -o CppServer -I../../lib/cpp/src/ -I../../build -L../../build/lib -lthrift
+    ${CXX} CppClient.cpp ${CPPFILES} -o CppClient -I../../lib/cpp/src/ -I../../build -L../../build/lib -lthrift
     put CppServer CppClient $BOARD_TESTDIR/fuego.$TESTDIR/
     report "cd $BOARD_TESTDIR/fuego.$TESTDIR; \
     sh -v run-tests.sh 2>&1"
-- 
2.9.3.windows.3





More information about the Fuego mailing list