Skip to content

Commit

Permalink
Correctly return the exit code when the unwrapped unit test failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Naios committed Jul 27, 2017
1 parent 6bd34c5 commit 5c208ae
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/unit/util/unwrapped.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,7 @@ int hpx_main(
}
}

finalize();

return report_errors();
return finalize();
}

///////////////////////////////////////////////////////////////////////////////
Expand All @@ -307,6 +305,11 @@ int main(
};

// Initialize and run HPX
return hpx::init(cmdline, argc, argv, cfg);
if (int result = init(cmdline, argc, argv, cfg))
{
return result;
}
// Report errors after HPX was finished
return report_errors();
}

0 comments on commit 5c208ae

Please sign in to comment.