ocloc fix multi command not recognized

Change-Id: I63b48ec09ce8ec083ce489ea11755f9f12cd9128
This commit is contained in:
chmielew
2020-05-18 10:06:14 +02:00
committed by sys_ocldev
parent f76d66da66
commit ce04f0d0e3
3 changed files with 8 additions and 8 deletions

View File

@ -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",

View File

@ -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];

View File

@ -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;