Skip to content

Commit

Permalink
Merge pull request #6503 from yurivict/FreeBSD-fix-tests
Browse files Browse the repository at this point in the history
Fix 2 tests on FreeBSD by initializing freebsd_environ
  • Loading branch information
hkaiser authored Jun 3, 2024
2 parents c09b82c + d3bb5b1 commit 5898e7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libs/core/debugging/tests/unit/print.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
// are completely elided

#include <hpx/debugging/print.hpp>
#include <hpx/init_runtime_local/init_runtime_local.hpp>
#include <hpx/modules/testing.hpp>
#include <hpx/modules/timing.hpp>
#include <hpx/threading_base/print.hpp>
Expand All @@ -32,6 +33,10 @@ int increment(std::atomic<int>& counter)

int main()
{
#if defined(__FreeBSD__)
freebsd_environ = environ;
#endif

// some counters we will use for checking if anything happens or not
std::atomic<int> enabled_counter(0);
std::atomic<int> disabled_counter(0);
Expand Down
5 changes: 5 additions & 0 deletions libs/core/program_options/tests/unit/parsers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <hpx/init_runtime_local/init_runtime_local.hpp>
#include <hpx/modules/filesystem.hpp>
#include <hpx/modules/testing.hpp>
#include <hpx/program_options/option.hpp>
Expand Down Expand Up @@ -347,6 +348,10 @@ v3 = 3

int main()
{
#if defined(__FreeBSD__)
freebsd_environ = environ;
#endif

test_command_line();
test_environment();
test_unregistered();
Expand Down

0 comments on commit 5898e7e

Please sign in to comment.