tag:help.appveyor.com,2012-11-13:/discussions/problems/6053-google-test-cases-failing-randomly-even-on-the-same-buildAppVeyor: Discussion 2018-08-25T02:14:58Ztag:help.appveyor.com,2012-11-13:Comment/419176492017-02-08T19:25:11Z2018-06-04T15:57:59ZGoogle test cases failing randomly, even on the same build<div><p>Any ideas as to what might be happening?</p></div>neal.kruistag:help.appveyor.com,2012-11-13:Comment/419176492017-02-08T21:14:29Z2017-02-08T21:14:29ZGoogle test cases failing randomly, even on the same build<div><p>Is there any way to display or upload as an artifact tests
traces to see what is actual failure?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/419176492017-02-08T21:28:10Z2018-06-04T15:57:59ZGoogle test cases failing randomly, even on the same build<div><p>I just added output to the terminal for the failures:</p>
<p><a href="https://ci.appveyor.com/project/nealkruis/kiva/build/1.0.115">https://ci.appveyor.com/project/nealkruis/kiva/build/1.0.115</a></p>
<p>The google tests are checking that the result of one calculation is within 55 of 2435 and another is within 100 of 2650. When they fail the calculated values are both 7.9462135179678107e+232.</p>
<p>It appears as though sometimes there is an overflow or a bad memory read? By why would this happen on some Appveyor instnaces and not others? Are there any differences among the machines that are used for these instances?</p></div>neal.kruistag:help.appveyor.com,2012-11-13:Comment/419176492017-02-08T21:39:25Z2018-06-04T15:57:59ZGoogle test cases failing randomly, even on the same build<div><p>The previous message was for 32bit MinGW. The 32bit MSVC build failed only on the second test with a calculated value of 1.2136100105786172e+233.</p></div>neal.kruistag:help.appveyor.com,2012-11-13:Comment/419176492017-02-08T21:43:11Z2017-02-08T21:43:11ZGoogle test cases failing randomly, even on the same build<div><p>VMs are identical... Can you try to add <a href="https://www.appveyor.com/docs/how-to/rdp-to-build-worker/">blocking
rdp</a> as <code>on_failure</code> script, jump on VM after test
failed and see if it reproes if you run it manually?</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/419176492017-02-09T00:51:44Z2018-06-04T15:58:00ZGoogle test cases failing randomly, even on the same build<div><p>Thanks for the tip! That helped a ton! I was able to use the debugger on the VM to track down my problem...embarrassingly an uninitialized variable. Crazy that the behavior can be so radically different from build to build.</p></div>neal.kruistag:help.appveyor.com,2012-11-13:Comment/419176492017-02-09T00:55:10Z2017-02-09T00:55:10ZGoogle test cases failing randomly, even on the same build<div><p>Ah, great! This is a reason to have a CI :)</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/419176492017-02-09T03:43:38Z2017-02-09T03:43:38ZGoogle test cases failing randomly, even on the same build<div><p>Side note. I am not familiar with Google tests, but as I
understand they support <code>xunit</code> format, so you can
<a href="https://www.appveyor.com/docs/running-tests/#uploading-xml-test-results">
upload results</a> for nice view.</p></div>Ilya Finkelshteyn