Abort if can't load from test-file

Change-Id: Id9deef8f088ad7a20770fbb6e49c1fbd4ac96cfb
Signed-off-by: dongwonk <dongwon.kim@intel.com>
This commit is contained in:
dongwonk 2019-02-15 11:01:40 -08:00 committed by sys_ocldev
parent 974bba0943
commit e030c9907e
1 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (C) 2018 Intel Corporation
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
@ -34,7 +34,11 @@ std::vector<char> MockSipKernel::getBinary() {
void *binary = nullptr;
auto binarySize = loadDataFromFile(testFile.c_str(), binary);
UNRECOVERABLE_IF(binary == nullptr);
std::vector<char> ret{reinterpret_cast<char *>(binary), reinterpret_cast<char *>(binary) + binarySize};
deleteDataReadFromFile(binary);
return ret;
}