Test buildFatBinary()

This change introduces ULTs for buildFatBinary() function.
It is intended to improve code coverage.

Related-To: NEO-6834
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
Patryk Wrobel
2022-04-26 13:10:51 +00:00
committed by Compute-Runtime-Automation
parent e8e3355a93
commit 1d7b99140c
2 changed files with 137 additions and 2 deletions

View File

@@ -378,8 +378,12 @@ int buildFatBinary(const std::vector<std::string> &args, OclocArgHelper *argHelp
argsCopy.push_back("-exclude_ir");
}
Ar::ArEncoder fatbinary(true);
if (deviceArgIndex == static_cast<size_t>(-1)) {
argHelper->printf("Error! Command does not contain device argument!\n");
return OclocErrorCode::INVALID_COMMAND_LINE;
}
Ar::ArEncoder fatbinary(true);
if (isDeviceWithPlatformAbbreviation(ConstStringRef(args[deviceArgIndex]), argHelper)) {
std::vector<ConstStringRef> targetPlatforms;
targetPlatforms = getTargetPlatformsForFatbinary(ConstStringRef(args[deviceArgIndex]), argHelper);