jiangwenhan / googletest

Automatically exported from code.google.com/p/googletest
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

README environment variables #403

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I ran the gtest_unittest.exe and got a number of warnings about missing 
enviornment variables, can we document these in the README file?

Here are the warnings I see on the console:

[----------] 2 tests from Int32FromEnvOrDieDeathTest
[ RUN      ] Int32FromEnvOrDieDeathTest.AbortsOnFailure
Running main() from gtest_main.cc
WARNING: The value of environment variable GTEST_VAR is expected to be a 32-bit 
integer, but actually has value "xxx".
[       OK ] Int32FromEnvOrDieDeathTest.AbortsOnFailure (776 ms)
[ RUN      ] Int32FromEnvOrDieDeathTest.AbortsOnInt32Overflow
Running main() from gtest_main.cc
WARNING: The value of environment variable GTEST_VAR is expected to be a 32-bit 
integer, but actually has value 1234567891234567891234, which overflows.
[       OK ] Int32FromEnvOrDieDeathTest.AbortsOnInt32Overflow (228 ms)
[----------] 2 tests from Int32FromEnvOrDieDeathTest (1004 ms total)

and

[----------] 1 test from ShouldShardDeathTest
[ RUN      ] ShouldShardDeathTest.AbortsWhenShardingEnvVarsAreInvalid
Running main() from gtest_main.cc
Invalid environment variables: we require 0 <= GTEST_SHARD_INDEX < 
GTEST_TOTAL_SHARDS, but you have GTEST_SHARD_INDEX=4, GTEST_TOTAL_SHARDS=4.
Running main() from gtest_main.cc
Invalid environment variables: we require 0 <= GTEST_SHARD_INDEX < 
GTEST_TOTAL_SHARDS, but you have GTEST_SHARD_INDEX=4, GTEST_TOTAL_SHARDS=-2.
Running main() from gtest_main.cc
Invalid environment variables: you have GTEST_SHARD_INDEX = 5, but have left 
GTEST_TOTAL_SHARDS unset.
Running main() from gtest_main.cc
Invalid environment variables: you have GTEST_TOTAL_SHARDS = 5, but have left 
GTEST_SHARD_INDEX unset.
[       OK ] ShouldShardDeathTest.AbortsWhenShardingEnvVarsAreInvalid (1610 ms)
[----------] 1 test from ShouldShardDeathTest (1610 ms total)

IMPORTANT NOTE: PLEASE send issues or requests to
http://groups.google.com/group/googletestframework *instead of here*.
This issue tracker is NOT regularly monitored.

If you really need to create a new issue, please provide the information
asked for below.

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of Google Test are you using? On what operating system?

Please provide any additional information below, such as a code snippet.

Original issue reported on code.google.com by l...@schouw.me on 8 Feb 2012 at 11:46

GoogleCodeExporter commented 9 years ago
I am using Windows 7 64 bit and Visual Studio 2010 SP1

Original comment by l...@schouw.me on 8 Feb 2012 at 11:47

GoogleCodeExporter commented 9 years ago
If you look at the tests you'll see that it's Google Test verifying its own 
subsystems in failure modes. As such, diagnostic output from them is to be 
expected. The important thing to look at is the final test result.

I don't think the issue warrants including in README. README should be discuss 
more general issues important to majority of users.

Original comment by vladlosev on 9 Feb 2012 at 8:14