Skip to content

Commit

Permalink
Update KLEE, fix small bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladislav Kalugin authored and ladisgin committed Sep 20, 2022
1 parent 92a5078 commit 8c7cced
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion server/src/Server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ Status Server::TestsGenServiceImpl::provideLoggingCallbacks(
*/
using namespace std::chrono_literals;
while (holdLockFlag[callbackName].exchange(true, std::memory_order_acquire)) {
std::this_thread::sleep_for(100ms);
std::this_thread::sleep_for(1ms);
}
loguru::remove_callback(callbackName.c_str());
if (openFiles) {
Expand Down
3 changes: 2 additions & 1 deletion server/src/building/Linker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ Result<Linker::LinkResult> Linker::linkWholeTarget(const fs::path &target) {
insideFolder = false;
}
}
if (!CollectionUtils::contains(testedFiles, objectInfo->getSourcePath()) && insideFolder) {
if ( CollectionUtils::contains(testGen.tests, objectInfo->getSourcePath()) &&
!CollectionUtils::contains(testedFiles, objectInfo->getSourcePath()) && insideFolder) {
fs::path bitcodeFile = objectInfo->kleeFilesInfo->getKleeBitcodeFile();
filesToLink.emplace(objectFile, bitcodeFile);
} else {
Expand Down
8 changes: 1 addition & 7 deletions server/test/framework/Syntax_Tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1464,7 +1464,7 @@ namespace {
}

TEST_F(Syntax_Test, Correct_CodeText_For_Regression_And_Error) {
auto [testGen, status] = createTestForFunction(linked_list_c, 3);
auto [testGen, status] = createTestForFunction(structs_with_pointers_c, 78);
const std::string code = testGen.tests.begin()->second.code;
const std::string beginRegressionRegion = "#pragma region " + Tests::DEFAULT_SUITE_NAME + NL;
const std::string endRegion = std::string("#pragma endregion") + NL;
Expand Down Expand Up @@ -1982,9 +1982,6 @@ namespace {
{
[] (const tests::Tests::MethodTestCase& testCase) {
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) == -1;
},
[] (const tests::Tests::MethodTestCase& testCase) {
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) > -1;
}
})
);
Expand Down Expand Up @@ -2676,9 +2673,6 @@ namespace {
testGen.tests.at(linked_list_c).methods.begin().value().testCases,
std::vector<TestCasePredicate>(
{
[] (const tests::Tests::MethodTestCase& testCase) {
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) == 0;
},
[] (const tests::Tests::MethodTestCase& testCase) {
return stoi(testCase.returnValue.view->getEntryValue(nullptr)) == 1;
},
Expand Down

0 comments on commit 8c7cced

Please sign in to comment.