Skip to content

Commit fb6ec25

Browse files
authored
Adding Integration tests for later building option (#126)
* Adding Integeration tests for later building option * Update CMakeLists.txt --------- Co-authored-by: Ammar ELWazir <aelwazir@amd.com> [ROCm/aqlprofile commit: e4bb0df]
1 parent 14c997d commit fb6ec25

File tree

17 files changed

+44
-25
lines changed

17 files changed

+44
-25
lines changed

projects/aqlprofile/CMakeLists.txt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ include(GNUInstallDirs)
1212
## Adding default path cmake modules
1313
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" )
1414
## Include common cmake modules
15-
include ( utils )
15+
include (utils)
1616
## Set build environment
17-
include ( env )
17+
include (env)
1818

1919
set(CMAKE_INSTALL_LIBDIR "lib" CACHE STRING "Library install directory")
2020

@@ -65,19 +65,30 @@ set ( TEST_BINARY_DIR ${PROJECT_BINARY_DIR}/test )
6565
add_subdirectory ( ${TEST_DIR} ${TEST_BINARY_DIR} )
6666
endif()
6767

68+
if(AQLPROFILE_INSTALL_TESTS)
69+
# Install Integration Tests
70+
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/test/integration/
71+
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PROJECT_NAME}/tests/integration
72+
COMPONENT tests)
73+
endif()
74+
6875
## Add the install directives for the runtime library.
6976
set ( DEST_NAME ${AQLPROFILE_NAME} )
7077
install ( TARGETS ${AQLPROFILE_TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT runtime )
7178
install ( TARGETS ${AQLPROFILE_TARGET} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT asan )
7279

7380
## Add the packaging directives for the runtime library.
7481
if ( ENABLE_ASAN_PACKAGING )
75-
set ( CPACK_PACKAGE_NAME ${AQLPROFILE_NAME}-asan )
82+
set (CPACK_PACKAGE_NAME ${AQLPROFILE_NAME}-asan)
7683
# ASAN Package requires only asan component with libraries and license file
77-
set ( CPACK_COMPONENTS_ALL asan )
84+
set (CPACK_COMPONENTS_ALL asan )
7885
else()
79-
set ( CPACK_PACKAGE_NAME ${AQLPROFILE_NAME} )
80-
set ( CPACK_COMPONENTS_ALL runtime tests )
86+
set (CPACK_PACKAGE_NAME ${AQLPROFILE_NAME})
87+
set (CPACK_COMPONENTS_ALL runtime)
88+
# Add tests component if INSTALL_TESTS is enabled
89+
if(AQLPROFILE_INSTALL_TESTS)
90+
list(APPEND CPACK_COMPONENTS_ALL tests)
91+
endif()
8192
endif()
8293
set ( CPACK_PACKAGE_VENDOR "Advanced Micro Devices, Inc." )
8394
set ( CPACK_PACKAGE_VERSION_MAJOR ${BUILD_VERSION_MAJOR} )

projects/aqlprofile/src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ set ( LIB_SRC
2525
)
2626

2727
add_library ( ${TARGET_LIB} SHARED ${LIB_SRC} )
28-
target_include_directories ( ${TARGET_LIB} PRIVATE ${LIB_DIR} ${API_PATH})
28+
target_include_directories ( ${TARGET_LIB} PRIVATE ${LIB_DIR} ${API_PATH} ${LIB_DIR}/core/include)
2929
target_link_libraries( ${TARGET_LIB} PRIVATE pthread hsa-runtime64::hsa-runtime64 )
3030

3131
## Generating definitions

projects/aqlprofile/src/core/aql_profile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// THE SOFTWARE.
2222

2323
#include "core/aql_profile.hpp"
24-
#include "core/include/aql_profile_v2.h"
24+
#include "aqlprofile-sdk/aql_profile_v2.h"
2525

2626
#include <cstdint>
2727
#include <future>

projects/aqlprofile/src/core/aql_profile.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#include <iostream>
2929
#include <string>
30-
#include "include/aql_profile_v2.h"
30+
#include "aqlprofile-sdk/aql_profile_v2.h"
3131

3232
#include "core/aql_profile_exception.h"
3333

projects/aqlprofile/src/core/counters.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// THE SOFTWARE.
2222

2323
#include "core/aql_profile.hpp"
24-
#include "core/include/aql_profile_v2.h"
24+
#include "aqlprofile-sdk/aql_profile_v2.h"
2525

2626
#include <array>
2727
#include <cstddef>

projects/aqlprofile/src/core/include/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
set(AQLPROFILE_HEADER_FILES
2-
aql_profile_v2.h
2+
aqlprofile-sdk/aql_profile_v2.h
33
)
44

55
install(

projects/aqlprofile/src/core/include/aql_profile_v2.h renamed to projects/aqlprofile/src/core/include/aqlprofile-sdk/aql_profile_v2.h

File renamed without changes.

projects/aqlprofile/src/core/memorymanager.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include <mutex>
2727
#include <unordered_map>
2828
#include <memory>
29-
#include "include/aql_profile_v2.h"
29+
#include "aqlprofile-sdk/aql_profile_v2.h"
3030
#include <stdexcept>
3131
#include "pm4/trace_config.h"
3232

projects/aqlprofile/src/core/pm4_factory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#include <sstream>
3535
#include <string>
3636

37-
#include "core/include/aql_profile_v2.h"
37+
#include "aqlprofile-sdk/aql_profile_v2.h"
3838
#include "core/aql_profile.hpp"
3939
#include "core/aql_profile_exception.h"
4040
#include "def/gpu_block_info.h"

projects/aqlprofile/src/core/tests/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
cmake_minimum_required(VERSION 3.16.0)
2+
project(aqlprofile-sdk-tests)
3+
14
# write a CMakeLists.txt file for the gfx9_factory_test
25
# that includes the necessary libraries and sets the properties for the test
36
include(GoogleTest)

0 commit comments

Comments
 (0)