mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
ocloc fix multi command not recognized
Change-Id: I63b48ec09ce8ec083ce489ea11755f9f12cd9128
This commit is contained in:
@ -48,7 +48,7 @@ TEST_F(MultiCommandTests, MultiCommandSuccessfulBuildTest) {
|
||||
nameOfFileWithArgs = "test_files/ImAMulitiComandMinimalGoodFile.txt";
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-multi",
|
||||
"multi",
|
||||
nameOfFileWithArgs.c_str(),
|
||||
"-q",
|
||||
};
|
||||
@ -73,7 +73,7 @@ TEST_F(MultiCommandTests, MultiCommandSuccessfulBuildWithOutputFileTest) {
|
||||
nameOfFileWithArgs = "test_files/ImAMulitiComandMinimalGoodFile.txt";
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-multi",
|
||||
"multi",
|
||||
nameOfFileWithArgs.c_str(),
|
||||
"-q",
|
||||
};
|
||||
@ -105,7 +105,7 @@ TEST_F(MultiCommandTests, GoodMultiBuildTestWithspecifiedOutputDir) {
|
||||
nameOfFileWithArgs = "test_files/ImAMulitiComandMinimalGoodFile.txt";
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-multi",
|
||||
"multi",
|
||||
nameOfFileWithArgs.c_str(),
|
||||
"-q",
|
||||
};
|
||||
@ -140,7 +140,7 @@ TEST_F(MultiCommandTests, LackOfTxtFileWithArgsMultiTest) {
|
||||
nameOfFileWithArgs = "test_files/ImANotExistedComandFile.txt";
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-multi",
|
||||
"multi",
|
||||
"test_files/ImANaughtyFile.txt",
|
||||
"-q",
|
||||
};
|
||||
@ -158,7 +158,7 @@ TEST_F(MultiCommandTests, LackOfClFilePointedInTxtFileMultiTest) {
|
||||
nameOfFileWithArgs = "test_files/ImAMulitiComandMinimalGoodFile.txt";
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-multi",
|
||||
"multi",
|
||||
nameOfFileWithArgs.c_str(),
|
||||
"-q",
|
||||
};
|
||||
@ -185,7 +185,7 @@ TEST_F(MultiCommandTests, GoodMultiBuildTestWithOutputFileListFlag) {
|
||||
nameOfFileWithArgs = "test_files/ImAMulitiComandMinimalGoodFile.txt";
|
||||
std::vector<std::string> argv = {
|
||||
"ocloc",
|
||||
"-multi",
|
||||
"multi",
|
||||
nameOfFileWithArgs.c_str(),
|
||||
"-q",
|
||||
"-output_file_list",
|
||||
|
@ -92,7 +92,7 @@ int MultiCommand::initialize(const std::vector<std::string> &args) {
|
||||
for (size_t argIndex = 1; argIndex < args.size(); argIndex++) {
|
||||
const auto &currArg = args[argIndex];
|
||||
const bool hasMoreArgs = (argIndex + 1 < args.size());
|
||||
if (hasMoreArgs && ConstStringRef("-multi") == currArg) {
|
||||
if (hasMoreArgs && ConstStringRef("multi") == currArg) {
|
||||
pathToCommandFile = args[++argIndex];
|
||||
} else if (hasMoreArgs && ConstStringRef("-output_file_list") == currArg) {
|
||||
outputFileList = args[++argIndex];
|
||||
|
@ -86,7 +86,7 @@ int oclocInvoke(unsigned int numArgs, const char *argv[],
|
||||
} else {
|
||||
return retVal;
|
||||
}
|
||||
} else if (numArgs > 1 && (ConstStringRef("multi") == allArgs[1] || ConstStringRef("-multi") == allArgs[1])) {
|
||||
} else if (numArgs > 1 && ConstStringRef("multi") == allArgs[1]) {
|
||||
int retValue = ErrorCode::SUCCESS;
|
||||
std::unique_ptr<MultiCommand> pMulti{(MultiCommand::create(allArgs, retValue, helper.get()))};
|
||||
return retValue;
|
||||
|
Reference in New Issue
Block a user