ASCOMInitiative / Conform

ASCOM Interface Conformance Checker
GNU General Public License v3.0
6 stars 2 forks source link

Dome validation #3

Closed tholo closed 5 years ago

tholo commented 5 years ago

Potential issue with doing Dome driver validation -- for a number of things there is a CanSomething to see if Something is implemented. But validation succeeds if that is true and Something raises a MethodNotImplemented.

For instance, CanFindHome returns true, but FindHome raises MethodNotImplemented -- Conform says "No errors or warnings", that optional FindHome raised allowable exception.

The exception appears to be for CanPark vs. Park -- that one generates error if declared as supported by raising the exception.

This seems somewhat counter intuitive -- should the exception be allowed after explicitly declaring a driver does support the method?

tholo commented 5 years ago

Actually, the Park one has the same issue -- it just happens to fail in the Post-run checks section due to not actually being implemented (yet).

Peter-Simpson commented 5 years ago

The exception appears to be for CanPark vs. Park -- that one generates error if declared as supported by raising the exception.

Actually, the Park one has the same issue -- it just happens to fail in the Post-run checks section due to not actually being implemented (yet).

Sorry, I don't understand the points you are making, please can you re-state them?

Thanks, Peter

tholo commented 5 years ago

So, driver under development had its various Can* properties adjusted to what will eventually be implemented in a particular dome driver, as follows:

Can Properties 
10:45:20.453 CanFindHome                       OK       True
10:45:20.510 CanPark                           OK       True
10:45:20.543 CanSetAltitude                    OK       True
10:45:20.591 CanSetAzimuth                     OK       True
10:45:20.625 CanSetPark                        OK       False
10:45:20.662 CanSetShutter                     OK       True
10:45:20.697 CanSlave                          OK       False
10:45:20.740 CanSyncAzimuth                    OK       False

At this point, one (well, I) would that things noted above that is supported, but actually throws MethodNotImplemented should flag as an issue -- since we claimed above we will support them, but actually do not:

Methods 
10:45:24.102 AbortSlew                         OK       AbortSlew command issued successfully
10:45:24.161 SlewToAltitude                    OK       Optional member threw a MethodNotImplementedException exception.
10:45:24.213 SlewToAzimuth                     OK       Optional member threw a MethodNotImplementedException exception.
10:45:24.252 SyncToAzimuth                     OK       Optional member threw a MethodNotImplementedException exception.
10:45:25.249 DomeSafety                                 OK pressed, testing continues
10:45:25.266 CloseShutter                      OK       Optional member threw a MethodNotImplementedException exception.
10:45:26.335 DomeSafety                                 OK pressed, testing continues
10:45:26.371 OpenShutter                       OK       Optional member threw a MethodNotImplementedException exception.
10:45:26.430 FindHome                          OK       Optional member threw a MethodNotImplementedException exception.
10:45:26.479 Park                              OK       Optional member threw a MethodNotImplementedException exception.
10:45:26.522 SetPark                           OK       Optional member threw a MethodNotImplementedException exception.
Peter-Simpson commented 5 years ago

OK, thanks I understand now. I've revised the code so that Conform will report Issues instead of OK if a CanXXX property is True but the XXX method throws a MethodNotImplementedException. Here is the new version, please can you let me know if it fixes the issue?

Conform 6.4.63.4

tholo commented 5 years ago

Here is the new version, please can you let me know if it fixes the issue?

Sorry, thought I responded to this last week... Yes, that did take care of it. Thank you again!

Peter-Simpson commented 5 years ago

Great, thanks for letting me know Thorston.