Skip to content

Commit

Permalink
Removed MT Debug info
Browse files Browse the repository at this point in the history
Now just to make the actual printing happen in the proper sequence
  • Loading branch information
Sir-NoChill committed Sep 13, 2024
1 parent 3afde6a commit ccf8cfd
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions src/testharness/TestHarness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,19 @@ void TestHarness::threadRunTestBatch(std::reference_wrapper<std::vector<std::str
{
// Loop while we have not exhausted the available tests
while (currentIndex < tests.get().size()) {
std::cout << "Entering loop" << std::endl;
size_t tmpIndex;

{
// Lock the index
std::lock_guard<std::mutex> lock(currentIndexLock);
std::cout << "Mutex Locked" << std::endl;

// store the current index
tmpIndex = currentIndex;
// increment for the next lad
currentIndex += cfg.getBatchSize();
}
std::cout << "Mutex Unlocked" << std::endl;
std::cout << "Current index: " << currentIndex << " || Tests size: " << tests.get().size() << std::endl;

size_t endIndex = ((tmpIndex + cfg.getBatchSize()) >= tests.get().size()) ? tests.get().size() : tmpIndex + cfg.getBatchSize();

std::cout << "Thread " << std::this_thread::get_id() << ": Executing tests [" << tmpIndex << ", " << endIndex << "]" << std::endl;

threadRunTestsForToolChain(std::ref(toolchains), std::ref(executables), std::ref(tests), tmpIndex, endIndex);
}
}
Expand All @@ -121,7 +114,6 @@ void TestHarness::threadRunTestsForToolChain(std::reference_wrapper<std::vector<
size_t begin, size_t end)
{
for (size_t i = begin; i < end; i++) {
std::cout << "Executing test #" << i << ": " << tests.get().at(i).get().first->getInsPath() << std::endl;
ToolChain toolChain = cfg.getToolChain(tcNames.get().at(i)); // Get the toolchain to use.
const fs::path& exe = cfg.getExecutablePath(exeNames.get().at(i)); // Set the toolchain's exe to be tested.
toolChain.setTestedExecutable(exe);
Expand Down

0 comments on commit ccf8cfd

Please sign in to comment.