Skip to content

Commit

Permalink
Added extra checks for completion status to TestAll Dependencies tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dougbinks committed Mar 5, 2024
1 parent fc8f596 commit 6474b35
Showing 1 changed file with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion example/TestAll.cpp
Expand Up @@ -410,11 +410,22 @@ int main(int argc, const char * argv[])
g_TS.AddTaskSetToPipe( &taskSetA );
g_TS.WaitforTask( &finalTask );

// check counters
// check counters and complete status
if( !taskSetA.GetIsComplete() )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue taskSetA not complete\n");
return false;
}

int32_t lastCount = taskSetA.m_Counter;
int32_t countCheck = lastCount;
for( auto& task : taskSetBs )
{
if( !task.GetIsComplete() )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue taskSetBs not complete\n");
return false;
}
if( task.m_Counter < countCheck )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue %d < %d at line %d\n", task.m_Counter, lastCount, __LINE__ );
Expand All @@ -423,6 +434,11 @@ int main(int argc, const char * argv[])
lastCount = std::max( lastCount, task.m_Counter );
}
countCheck = lastCount;
if( !pinnedTaskC.GetIsComplete() )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue pinnedTaskC not complete\n");
return false;
}
if( pinnedTaskC.m_Counter < countCheck )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue %d < %d at line %d\n", pinnedTaskC.m_Counter, lastCount, __LINE__ );
Expand All @@ -432,6 +448,11 @@ int main(int argc, const char * argv[])
countCheck = lastCount;
for( auto& task : taskSetDs )
{
if( !task.GetIsComplete() )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue taskSetDs not complete\n");
return false;
}
if( task.m_Counter < countCheck )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue %d < %d at line %d\n", task.m_Counter, lastCount, __LINE__ );
Expand All @@ -442,6 +463,11 @@ int main(int argc, const char * argv[])
countCheck = lastCount;
for( auto& task : taskSetEs )
{
if( !task.GetIsComplete() )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue taskSetEs not complete\n");
return false;
}
if( task.m_Counter < countCheck )
{
fprintf( stderr,"\tERROR: enkiTS dependencies issue %d < %d at line %d\n", task.m_Counter, lastCount, __LINE__ );
Expand Down

0 comments on commit 6474b35

Please sign in to comment.