Skip to contentSkip to conversation

repair test program build script

PATCH Applied Song Cai 3 participants 4 messages Oct 13, 2017 – Oct 23, 2017

lore
Share & tools
lore

Song Cai

author
#0 lore raw

PATCH 7/18 repair test program build script

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.

---
 engine/tests/Functional.thrift/fuego_test.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
engine/tests/Functional.thrift/fuego_test.sh +6 -2
index 3b52b4a..da41535 100755
@@ -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"
Signature · 1 line
2.9.3.windows.3
#1 lore raw
Quoted 48 lines

-----Original Message-----
From: [email protected] [mailto:fuego- [email protected]] On Behalf Of Song Cai
Sent: Friday, October 13, 2017 3:07 AM
To: [email protected]
Subject: [Fuego] [PATCH 07/18] repair test program build script

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.

---
 engine/tests/Functional.thrift/fuego_test.sh | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
engine/tests/Functional.thrift/fuego_test.sh +2 -0
index 3b52b4a..da41535 100755
@@ -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 ..

engine/tests/Functional.thrift/fuego_test.sh +2 -0
+    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"

engine/tests/Functional.thrift/fuego_test.sh +1 -2
-    ${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

Quoted 5 lines
     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

This looks OK, but I wasn't able to run the final results, as I don't have a target with thrift on it. It would be good to add a test_pre_check with is_on_target for 'thrift'.

Since it uses cmake, I added a patch in the fuego repository to add the 'cmake' package to the docker container. This might be needed by other tests.

Once again, I assume that AGL includes thrift by default.

I'm applying this.

Thanks!
-- Tim

#3 lore raw

Hi,

Quoted 16 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Bird, Timothy
Sent: Tuesday, October 17, 2017 9:28 AM
To: Bird, Timothy <[email protected]>; Cai, Song/蔡 嵩 <[email protected]>; [email protected]
Subject: Re: [Fuego] [PATCH 07/18] repair test program build script

The patch series is missing the following patches:
PATCH 08/18
PATCH 11/18
PATCH 18/18

Quoted 7 lines

I didn't receive these by e-mail, and not in the archives on the mailing list.
See
https://lists.linuxfoundation.org/pipermail/fuego/2017-October/thread.
html

Did they get rejected, or did you miss sending them?

Thanks for your review.
About your comments about those patches, I will try to improve and resubmit them.

It might take me some time because I also have some other things to be done. But I'll resubmit it as soon as possible.

Best regards
Liu

Quoted 6 lines

-- Tim
_______________________________________________
Fuego mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/fuego