jhu-cisst / cisst

JHU ERC CISST Library
http://github.com/jhu-cisst/cisst/wiki
Other
64 stars 47 forks source link

Minor fixes #71

Closed dlrdave closed 5 years ago

dlrdave commented 5 years ago

"Re-opening" https://github.com/jhu-cisst/cisst/pull/68

First commit is an AdvanceIfAutomatic call at the end of StartupInternal. We've been using it since last summer -- it fixes incorrect data being returned from a component which has been started up, but which has not yet completed its first Run method call.

Second commit is a test-only-code change so the test will pass in multiple testing scenarios. Both of the following now pass, with or without an existing testLog.txt file on disk:

cisstCommonTests.exe "-r" "-i" "2" "-o" "2" "-t" "cmnLoggerTest::TestLoggerFileName"
cisstCommonTests.exe "-r"
adeguet1 commented 5 years ago

Follow-up:

dlrdave commented 5 years ago
  • I now understand the logic behind the static bool, ignore my previous comment

Yay! The test method may be run once or multiple times within the same call to the test executable. Furthermore, other tests may or may not run beforehand which may yield differing cmnLogger::IsCreated() results even on the first test method call. The state seems unpredictable from this test method's point of view, so I tried to accommodate all the possibilities.

  • Other change re. state table advance in Startup method doesn't have negative impact on dVRK stack (fairly extensive test case by itself).

Also "Yay!".

Thanks for the merge: great to have this stuff in devel, and therefore, in the next release of cisst.