Added new ENABLE_CODE_COVERAGE option. (#1664)

Modified install.sh script to add this new option
This commit is contained in:
Atul Kulkarni
2025-06-10 12:12:36 -05:00
committed by GitHub
parent b926203c05
commit 682ed36fe6
5 changed files with 64 additions and 7 deletions
+9 -1
View File
@@ -56,9 +56,17 @@ if(BUILD_TESTS)
common/TestBed.cpp
common/TestBedChild.cpp
common/StandaloneUtils.cpp
../src/misc/recorder.cc
)
# Append a file if BUILD_TESTS is ON and build type is not Debug
# Visibility is hidden by default, so we need to explicitly add the recorder.cc file
# to the unit tests to ensure it is included for unit test execution
if(BUILD_TESTS AND NOT CMAKE_BUILD_TYPE MATCHES "Debug")
list(APPEND TEST_SOURCE_FILES
../src/misc/recorder.cc
)
endif()
add_executable(rccl-UnitTests ${TEST_SOURCE_FILES})
## Set rccl-UnitTests include directories
+2 -2
View File
@@ -8,7 +8,7 @@
#include <rccl/rccl.h>
#include "RcclMockFuncs.hpp"
//#include "TestBed.hpp"
#include "comm.h"
#include <thread>
@@ -34,7 +34,7 @@ namespace RcclUnitTesting
hipStreamCreate(&stream);
int array[] = {2, 3, 5};
ncclComm comm{.nRanks = 1, .localRank = 1, .localRankToRank = array, .opCount = 8, .planner = {.nTasksColl = 13, .nTasksP2p = 21}};
ncclComm comm{.nRanks = 1, .localRank = 1, .localRankToRank = array, .opCount = 8, .planner = {.nTasksColl = 13, .nTasksP2p = 21}};
rccl::rcclApiCall call(rccl::rrAllToAllv, {.sendbuff = (void*)0x7f22f9600000, .recvbuff = (void*)0x7f22f9601000, .count = 0, .datatype = ncclFloat32, .comm = &comm, .stream = stream});
rccl::Recorder::instance().record(call);
+5 -1
View File
@@ -1,7 +1,11 @@
#ifndef RCCL_MOCK_FUNCS_HPP
#define RCCL_MOCK_FUNCS_HPP
#include "info.h"
#include "comm.h"
void ncclDebugLog(ncclDebugLogLevel, unsigned long, char const*, int, char const*, ...) {};
ncclResult_t getHostName(char* hostname, int maxlen, const char delim) {
return ncclSuccess;
}
#endif // RCCL_MOCK_FUNCS_HPP