!24301 [MSLITE] enable runtime allocator testcase

Merge pull request !24301 from ling/sr
This commit is contained in:
i-robot 2021-09-28 08:08:44 +00:00 committed by Gitee
commit eae1655c6f
3 changed files with 8 additions and 6 deletions

View File

@ -119,12 +119,12 @@ add_dependencies(lite-test fbs_src fbs_inner_src)
target_link_libraries(lite-test mindspore-lite dl mindspore::gtest)
## test file using gmock
#target_link_libraries(lite-test mindspore::gmock)
#add_library(gmock_tests OBJECT ${TEST_DIR}/st/optimize_allocator_test.cc)
#add_dependencies(gmock_tests fbs_src fbs_inner_src)
#target_compile_options(gmock_tests PRIVATE -fno-rtti)
#target_link_libraries(lite-test gmock_tests)
# test file using gmock
target_link_libraries(lite-test mindspore::gmock)
add_library(gmock_tests OBJECT ${TEST_DIR}/st/optimize_allocator_test.cc)
add_dependencies(gmock_tests fbs_src fbs_inner_src)
target_compile_options(gmock_tests PRIVATE -fno-rtti)
target_link_libraries(lite-test gmock_tests)
if(MSLITE_ENABLE_TRAIN)
target_link_libraries(lite-test mindspore-lite-train minddata-lite)

View File

@ -13,6 +13,7 @@ mkdir -pv ${CUR_DIR}/do_test
cd ${CUR_DIR}/do_test
cp ${BUILD_DIR}/test/lite-test ./
cp ${BUILD_DIR}/googletest/googlemock/gtest/libgtest.so ./
cp ${BUILD_DIR}/googletest/googlemock/gtest/libgmock.so ./
ls -l *.so*
export LD_LIBRARY_PATH=./:${TENSORRT_PATH}/lib:${CUDA_HOME}/lib64:${LD_LIBRARY_PATH}

View File

@ -43,6 +43,7 @@ function Run_arm64_ut() {
echo 'cd /data/local/tmp/ut_test' > adb_cmd.txt
echo 'cp /data/local/tmp/libc++_shared.so ./' >> adb_cmd.txt
echo 'cp /data/local/tmp/libgtest.so ./' >> adb_cmd.txt
echo 'cp /data/local/tmp/libgmock.so ./' >> adb_cmd.txt
echo 'chmod 777 lite-test' >> adb_cmd.txt
adb -s ${device_id} shell < adb_cmd.txt