diff --git a/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt b/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt index 99c61a1e88..c6b1c2bb35 100644 --- a/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt +++ b/projects/rocprofiler/tests-v2/featuretests/tracer/CMakeLists.txt @@ -28,6 +28,8 @@ file(GLOB GTEST_MAIN_SRC_FILE ${GTEST_MAIN_DIR}/*.cpp) set_source_files_properties(apps/hello_world.cpp PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1) hip_add_executable(tracer_hip_helloworld apps/hello_world.cpp) set_target_properties(tracer_hip_helloworld PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/tests-v2/featuretests/tracer/apps") +target_link_options(tracer_hip_helloworld PRIVATE "-Wl,--build-id=md5") +install(TARGETS tracer_hip_helloworld RUNTIME DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests/featuretests/tracer/apps COMPONENT tests) #hsa-mem_async_copy and async_copy_on_engine set_source_files_properties(apps/copy_on_engine.cpp PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1) @@ -48,4 +50,11 @@ target_include_directories(runTracerFeatureTests PRIVATE ${PROJECT_SOURCE_DIR} $ target_link_libraries(runTracerFeatureTests PRIVATE hsa-runtime64::hsa-runtime64 GTest::gtest GTest::gtest_main Threads::Threads dl stdc++fs) +target_link_options(runTracerFeatureTests PRIVATE "-Wl,--build-id=md5") +install(TARGETS runTracerFeatureTests RUNTIME DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests COMPONENT tests) add_dependencies(tests runTracerFeatureTests) + +install( + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/apps/goldentraces/ + DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests/featuretests/tracer/apps/goldentraces + COMPONENT tests) diff --git a/projects/rocprofiler/tests-v2/featuretests/tracer/tracer_gtest.cpp b/projects/rocprofiler/tests-v2/featuretests/tracer/tracer_gtest.cpp index c55224814c..3b4c64c21d 100644 --- a/projects/rocprofiler/tests-v2/featuretests/tracer/tracer_gtest.cpp +++ b/projects/rocprofiler/tests-v2/featuretests/tracer/tracer_gtest.cpp @@ -23,6 +23,7 @@ THE SOFTWARE. #include #include #include "tracer_gtest.h" +#include "src/utils/logger.h" std::string running_path; std::string lib_path; @@ -34,7 +35,8 @@ std::string profiler_api_lib_path = ""; static void init_test_path() { if (is_installed_path()) { - running_path = "share/rocprofiler/tracer/runTracerFeatureTests"; + INFO_LOGGING("operating from /opt/rocm"); + running_path = "share/rocprofiler/tests/runTracerFeatureTests"; lib_path = "lib/rocprofiler/librocprofiler_tool.so"; golden_trace_path = "share/rocprofiler/tests/featuretests/tracer/apps/goldentraces/"; test_app_path = "share/rocprofiler/tests/featuretests/tracer/apps/"; @@ -42,6 +44,7 @@ static void init_test_path() { binary_path = "bin/rocprofv2"; profiler_api_lib_path = "/lib"; } else { + INFO_LOGGING("operating from ./build"); running_path = "tests-v2/featuretests/tracer/runTracerFeatureTests"; lib_path = "librocprofiler_tool.so"; golden_trace_path = "tests-v2/featuretests/tracer/apps/goldentraces/"; @@ -120,9 +123,8 @@ void ApplicationParser::GetKernelInfoForGoldenOutput( const char* app_name, std::string file_name, std::vector* kernel_info_output) { std::string entry; - std::string path = GetRunningPath("runTracerFeatureTests"); - entry = path.append("apps/goldentraces/") + file_name; - + std::string path = GetRunningPath(running_path); + entry = path.append(golden_trace_path) + file_name; // parse kernel info fields for golden output ParseKernelInfoFields(entry, kernel_info_output); }