mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
Improve code coverage of MultiCommand class
This change introduces ULTs for untested parts of MultiCommand class. Furthermore, it contains MockMultiCommand class, which allows white-box testing. Related-To: NEO-6834 Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f2a18370e8
commit
9cba46e5bf
@@ -159,7 +159,7 @@ Usage: ocloc multi <file_name>
|
||||
<file_name> Input file containing a list of arguments for subsequent
|
||||
ocloc invocations.
|
||||
Expected format of each line inside such file is:
|
||||
'-file <filename> -device <device_type> [compile_options].
|
||||
'-file <filename> -device <device_type> [compile_options]'.
|
||||
See 'ocloc compile --help' for available compile_options.
|
||||
Results of subsequent compilations will be dumped into
|
||||
a directory with name indentical file_name's base name.
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/offline_compiler/source/decoder/binary_decoder.h"
|
||||
#include "shared/offline_compiler/source/decoder/binary_encoder.h"
|
||||
#include "shared/offline_compiler/source/offline_compiler.h"
|
||||
@@ -23,7 +25,7 @@ class MultiCommand {
|
||||
public:
|
||||
MultiCommand &operator=(const MultiCommand &) = delete;
|
||||
MultiCommand(const MultiCommand &) = delete;
|
||||
~MultiCommand() = default;
|
||||
MOCKABLE_VIRTUAL ~MultiCommand() = default;
|
||||
|
||||
static MultiCommand *create(const std::vector<std::string> &args, int &retVal, OclocArgHelper *helper);
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ class OclocArgHelper {
|
||||
PRODUCT_CONFIG findConfigMatch(const std::string &device, bool firstAppearance);
|
||||
void insertGenNames(GFXCORE_FAMILY family);
|
||||
std::vector<std::string> headersToVectorOfStrings();
|
||||
void readFileToVectorOfStrings(const std::string &filename, std::vector<std::string> &lines);
|
||||
MOCKABLE_VIRTUAL void readFileToVectorOfStrings(const std::string &filename, std::vector<std::string> &lines);
|
||||
MOCKABLE_VIRTUAL std::vector<char> readBinaryFile(const std::string &filename);
|
||||
MOCKABLE_VIRTUAL std::unique_ptr<char[]> loadDataFromFile(const std::string &filename, size_t &retSize);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user