update
This commit is contained in:
parent
ca25c838f5
commit
ec64b17b27
4 changed files with 14 additions and 9 deletions
|
|
@ -182,17 +182,16 @@ clang++ -std=c++26 -Wno-reserved-identifier -Wno-reserved-module-identifier --pr
|
|||
name.replace_extension();
|
||||
if(!fs::exists(buildDir/name)) {
|
||||
if(!config.dependencies[i].branch.empty()) {
|
||||
RunCommandIgnore(std::format("cd {} && git clone {} && cd {} && git switch {}", buildDir.string(), config.dependencies[i].path, (buildDir/name).string(), config.dependencies[i].branch));
|
||||
system(std::format("cd {} && git clone {} && cd {} && git switch {}", buildDir.string(), config.dependencies[i].path, (buildDir/name).string(), config.dependencies[i].branch).c_str());
|
||||
} else if(!config.dependencies[i].commit.empty()){
|
||||
std::cout << std::format("cd {} && git clone {} && cd {} && git checkout {}", buildDir.string(), config.dependencies[i].path, (buildDir/name).string(), config.dependencies[i].commit) << std::endl;
|
||||
RunCommandIgnore(std::format("cd {} && git clone {} && cd {} && git checkout {}", buildDir.string(), config.dependencies[i].path, (buildDir/name).string(), config.dependencies[i].commit));
|
||||
system(std::format("cd {} && git clone {} && cd {} && git checkout {}", buildDir.string(), config.dependencies[i].path, (buildDir/name).string(), config.dependencies[i].commit).c_str());
|
||||
} else {
|
||||
RunCommandIgnore(std::format("cd {} && git clone {}", buildDir.string(), config.dependencies[i].path));
|
||||
system(std::format("cd {} && git clone {}", buildDir.string(), config.dependencies[i].path).c_str());
|
||||
}
|
||||
} else if(config.dependencies[i].commit.empty()) {
|
||||
RunCommandIgnore(std::format("cd {} && git pull", (buildDir/name).string()));
|
||||
system(std::format("cd {} && git pull", (buildDir/name).string()).c_str());
|
||||
}
|
||||
config.dependencies[i].path = fs::path(config.dependencies[i].path).filename().replace_extension()/"project.json";
|
||||
config.dependencies[i].path = buildDir/name/"project.json";
|
||||
}
|
||||
if(fs::path(config.dependencies[i].path).is_relative()) {
|
||||
config.dependencies[i].path = this->path/config.dependencies[i].path;
|
||||
|
|
@ -372,7 +371,12 @@ clang++ -std=c++26 -Wno-reserved-identifier -Wno-reserved-module-identifier --pr
|
|||
dlclose(handle);
|
||||
throw std::runtime_error(std::format("Cannot load symbol 'RunTest': {}", msg));
|
||||
}
|
||||
std::string* testResult = loadedTest();
|
||||
std::string* testResult;
|
||||
try {
|
||||
testResult = loadedTest();
|
||||
} catch(std::exception& e) {
|
||||
return {test.config.name, std::string(e.what())};
|
||||
}
|
||||
if(testResult != nullptr) {
|
||||
TestResult result = {test.config.name, *testResult};
|
||||
delete testResult;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue