Skip to content

Commit

Permalink
Environment variables are accessible in UWP/WinRT apps
Browse files Browse the repository at this point in the history
Environment variables, for example `GTEST_FILTER`, `GTEST_OUTPUT` can be set
before getting WinRT app run. GoogleTest can read environment variables and use
them. It's easier than setting and passing command line parameters to WinRT app.
  • Loading branch information
sergio-nsk committed Mar 10, 2023
1 parent 50e07d1 commit 2d3b36d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions googletest/include/gtest/internal/gtest-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -2169,8 +2169,8 @@ inline const char* StrError(int errnum) { return strerror(errnum); }

inline const char* GetEnv(const char* name) {
#if defined(GTEST_OS_WINDOWS_MOBILE) || defined(GTEST_OS_WINDOWS_PHONE) || \
defined(GTEST_OS_WINDOWS_RT) || defined(GTEST_OS_ESP8266) || \
defined(GTEST_OS_XTENSA) || defined(GTEST_OS_QURT)
defined(GTEST_OS_ESP8266) || defined(GTEST_OS_XTENSA) || \
defined(GTEST_OS_QURT)
// We are on an embedded platform, which has no environment variables.
static_cast<void>(name); // To prevent 'unused argument' warning.
return nullptr;
Expand Down

0 comments on commit 2d3b36d

Please sign in to comment.