gittripley opened a new issue #4490: Issue with running cpp test
URL: https://github.com/apache/incubator-tvm/issues/4490
 
 
   I followed the instruction in https://docs.tvm.ai/install/from_source.html 
to install the google test.
   
   However, `make cpptest` failed, because missing google test header files.
   
   So I have to update the CMakeLists.txt to specify the path. Maybe I missed 
something else.
   
   Here is my changes.
   `ubuntu@ubuntu:~/tvm$ git diff CMakeLists.txt
   diff --git a/CMakeLists.txt b/CMakeLists.txt
   index bf18ffc..045a89e 100644
   --- a/CMakeLists.txt
   +++ b/CMakeLists.txt
   @@ -333,7 +333,7 @@ target_include_directories(
    # Tests
    set(TEST_EXECS "")
    file(GLOB TEST_SRCS tests/cpp/*.cc)
   -find_path(GTEST_INCLUDE_DIR gtest/gtest.h)
   +find_path(GTEST_INCLUDE_DIR gtest/gtest.h "/usr/local/include")
    find_library(GTEST_LIB gtest "$ENV{GTEST_LIB}")
   
    # Create the `cpptest` target if we can find GTest.  If not, we create dummy
   `
   
   If I run tests/scripts/task_cpp_unittest.sh, I got another error. 
   Here is my update.
   '
   ubuntu@ubuntu:~/tvm$ git diff tests/scripts/task_cpp_unittest.sh
   diff --git a/tests/scripts/task_cpp_unittest.sh 
b/tests/scripts/task_cpp_unittest.sh
   index 69697ca..b3e59b5 100755
   --- a/tests/scripts/task_cpp_unittest.sh
   +++ b/tests/scripts/task_cpp_unittest.sh
   @@ -22,9 +22,9 @@ set -u
    export LD_LIBRARY_PATH="lib:${LD_LIBRARY_PATH:-}"
   
    # Remove existing testcases
   -rm -f build/*_test
   +rm -f *_test
   
    make cpptest -j8
   -for test in build/*_test; do
   +for test in *_test; do
        ./$test
    done
   `
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to