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: e4bb0df9d5]
This commit is contained in:
zatwierdzone przez
GitHub
rodzic
14c997d5b4
commit
fb6ec25d41
@@ -25,7 +25,7 @@ set ( LIB_SRC
|
||||
)
|
||||
|
||||
add_library ( ${TARGET_LIB} SHARED ${LIB_SRC} )
|
||||
target_include_directories ( ${TARGET_LIB} PRIVATE ${LIB_DIR} ${API_PATH})
|
||||
target_include_directories ( ${TARGET_LIB} PRIVATE ${LIB_DIR} ${API_PATH} ${LIB_DIR}/core/include)
|
||||
target_link_libraries( ${TARGET_LIB} PRIVATE pthread hsa-runtime64::hsa-runtime64 )
|
||||
|
||||
## Generating definitions
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "core/aql_profile.hpp"
|
||||
#include "core/include/aql_profile_v2.h"
|
||||
#include "aqlprofile-sdk/aql_profile_v2.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <future>
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include "include/aql_profile_v2.h"
|
||||
#include "aqlprofile-sdk/aql_profile_v2.h"
|
||||
|
||||
#include "core/aql_profile_exception.h"
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "core/aql_profile.hpp"
|
||||
#include "core/include/aql_profile_v2.h"
|
||||
#include "aqlprofile-sdk/aql_profile_v2.h"
|
||||
|
||||
#include <array>
|
||||
#include <cstddef>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
set(AQLPROFILE_HEADER_FILES
|
||||
aql_profile_v2.h
|
||||
aqlprofile-sdk/aql_profile_v2.h
|
||||
)
|
||||
|
||||
install(
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#include <mutex>
|
||||
#include <unordered_map>
|
||||
#include <memory>
|
||||
#include "include/aql_profile_v2.h"
|
||||
#include "aqlprofile-sdk/aql_profile_v2.h"
|
||||
#include <stdexcept>
|
||||
#include "pm4/trace_config.h"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "core/include/aql_profile_v2.h"
|
||||
#include "aqlprofile-sdk/aql_profile_v2.h"
|
||||
#include "core/aql_profile.hpp"
|
||||
#include "core/aql_profile_exception.h"
|
||||
#include "def/gpu_block_info.h"
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
cmake_minimum_required(VERSION 3.16.0)
|
||||
project(aqlprofile-sdk-tests)
|
||||
|
||||
# write a CMakeLists.txt file for the gfx9_factory_test
|
||||
# that includes the necessary libraries and sets the properties for the test
|
||||
include(GoogleTest)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <gtest/gtest.h>
|
||||
#include <gmock/gmock.h>
|
||||
#include <hsa/hsa.h>
|
||||
#include "core/include/aql_profile_v2.h"
|
||||
#include "aqlprofile-sdk/aql_profile_v2.h"
|
||||
|
||||
// Mocks and helpers
|
||||
namespace {
|
||||
@@ -94,7 +94,7 @@ TEST(CountersTest, DeletePackets) {
|
||||
|
||||
hsa_status_t status = aqlprofile_pmc_create_packets(
|
||||
&handle, &packets, profile, mock_alloc, mock_dealloc, mock_memcpy, &mem);
|
||||
|
||||
|
||||
// Only proceed if creation succeeded
|
||||
if (status == HSA_STATUS_SUCCESS) {
|
||||
// This should not crash or throw
|
||||
@@ -106,13 +106,13 @@ TEST(CountersTest, DeletePackets) {
|
||||
TEST(CountersTest, ValidateEvent) {
|
||||
aqlprofile_agent_handle_t agent = {};
|
||||
agent.handle = 0;
|
||||
|
||||
|
||||
aqlprofile_pmc_event_t event = {};
|
||||
event.block_name = HSA_VEN_AMD_AQLPROFILE_BLOCK_NAME_GRBM;
|
||||
|
||||
|
||||
bool result = true;
|
||||
hsa_status_t status = aqlprofile_validate_pmc_event(agent, &event, &result);
|
||||
|
||||
|
||||
// In a mock environment, we can't guarantee validation, but we can check that it runs
|
||||
EXPECT_TRUE(status == HSA_STATUS_SUCCESS || status == HSA_STATUS_ERROR);
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
// THE SOFTWARE.
|
||||
|
||||
#include "core/aql_profile.hpp"
|
||||
#include "core/include/aql_profile_v2.h"
|
||||
#include "aqlprofile-sdk/aql_profile_v2.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <future>
|
||||
|
||||
Reference in New Issue
Block a user