GNOME Bugzilla – Bug 695177
server/tests are broken in git master
Last modified: 2013-03-13 10:45:40 UTC
server/tests were not building in git master. So, I did this patch series (to be uploaded), fixing the build problem. However, trying to run a "make check" looks like the tests are broken themselves[0]. To run the tests, I did: - set EWS_TEST_USERNAME as a valid username - set EWS_TEST_PASSWORD as a valid password - set EWS_TEST_EMAIL as a valid exchange email address - set EWS_TEST_URI as the URL for a valid exchange email server. [0]: fidencio@srv ~/src/gnome/evolution-ews/src/server/tests $ make check make testews make[1]: Entering directory `/home/fidencio/src/gnome/evolution-ews/src/server/tests' make[1]: `testews' is up to date. make[1]: Leaving directory `/home/fidencio/src/gnome/evolution-ews/src/server/tests' make check-TESTS make[1]: Entering directory `/home/fidencio/src/gnome/evolution-ews/src/server/tests' /libews/connections: Test Connections Success : Created a new connection Testing Autodiscovery.... test-connection.c:128 con_test_autodiscover : password : xxx xxx test-connection.c:129 con_test_autodiscover : email : foo@bar.boo Testing postive case... /bin/sh: line 5: 22369 Segmentation fault (core dumped) ${dir}$tst FAIL: testews =========================================================================== 1 of 1 test failed Please report to http://bugzilla.gnome.org/browse.cgi?product=evolution-ews =========================================================================== make[1]: *** [check-TESTS] Error 1 make[1]: Leaving directory `/home/fidencio/src/gnome/evolution-ews/src/server/tests' make: *** [check-am] Error 2
Created attachment 238073 [details] [review] server/tests: fix arguments passed e_ews_connection_create_folder
Created attachment 238074 [details] [review] server/tests: fix typo: get_delegate -> info
Created attachment 238075 [details] [review] server/tests: drop deprecated g_thread_init call
Created attachment 238076 [details] [review] server/tests: use EEwsOofSettings instead of OOFSettings OOFSettings was remove a few time ago and replaced by EEwsOofSettings
Patches looks good, let's extend them to get rid of the crash too + the coding style with space after function name and (void) in function prototypes (I know, it was already there).
Created attachment 238533 [details] [review] Bug #695177 - server/tests: fix make check - fix arguments passed e_ews_connection_create_folder - fix typo: get_delegate -> info - drop deprecated g_thread_init call - replace OOFSettings by EEwsOofSettings Tests still are not working. Some comments were done in the code and tips are welcome about how to proceed with the issues.
Review of attachment 238533 [details] [review]: ::: src/server/tests/test-connection.c @@ +87,3 @@ + /* + * How to get an EwsUrls here, once the callback was a bit changed? + */ the 'object' is CamelEwsSettings, from e_ews_autodiscover_ws_url(), thus I'd cast it to ews_settings and get the information from there. @@ +130,3 @@ g_assert_cmpstr (password, !=, NULL); + extra space? ::: src/server/tests/test-libews.c @@ +44,3 @@ + * how to proceed? + */ +// g_test_add_func ("/libews/oofsettingssubmit", oof_settings_submit_test_run); do not use C++ comments, stick on C comments (// versus /* */) @@ +49,3 @@ + * Unable to get out of office settings: The SMTP address has no mailbox + * associated with it. + * how to proceed? it might mean that the emaila ddress beign set on the EEwsConnection/CamelEwsSettings is not the one known to the server. Check how you read it from the environment variables (and make sure the env variable is set properly too, like the '@' can be a significant letter for the shell). @@ +65,3 @@ + * Unable to get delegate: The SMTP address has no mailbox associated with + * it. + */ dtto, same as above ::: src/server/tests/test-get-oof-settings.c @@ +34,3 @@ #include "utils.h" +void oof_settings_new_test_run (); use 'void', please (similar on below functions). I know it was done that way earlier too, thus if you could cleanup it, then even better. ::: src/server/tests/test-set-oof-settings.c @@ +34,3 @@ #include "utils.h" +void oof_settings_submit_test_run (); Use 'void' please.
(In reply to comment #7) > Review of attachment 238533 [details] [review]: > > ::: src/server/tests/test-connection.c > @@ +87,3 @@ > + /* > + * How to get an EwsUrls here, once the callback was a bit changed? > + */ > > the 'object' is CamelEwsSettings, from e_ews_autodiscover_ws_url(), thus I'd > cast it to ews_settings and get the information from there. Ah, right! Thanks. > > @@ +130,3 @@ > g_assert_cmpstr (password, !=, NULL); > > + > > extra space? Ooops. > > ::: src/server/tests/test-libews.c > @@ +44,3 @@ > + * how to proceed? > + */ > +// g_test_add_func ("/libews/oofsettingssubmit", > oof_settings_submit_test_run); > > do not use C++ comments, stick on C comments (// versus /* */) Right, thanks for the heads up. And, actually, these comments are not going to the code. > > @@ +49,3 @@ > + * Unable to get out of office settings: The SMTP address has no mailbox > + * associated with it. > + * how to proceed? > > it might mean that the emaila ddress beign set on the > EEwsConnection/CamelEwsSettings is not the one known to the server. Check how > you read it from the environment variables (and make sure the env variable is > set properly too, like the '@' can be a significant letter for the shell). The email address is known to the server. Another tests use the same email address to connect in the server and bla, bla, bla without problems. > > @@ +65,3 @@ > + * Unable to get delegate: The SMTP address has no mailbox associated with > + * it. > + */ > > dtto, same as above > > ::: src/server/tests/test-get-oof-settings.c > @@ +34,3 @@ > #include "utils.h" > > +void oof_settings_new_test_run (); > > use 'void', please (similar on below functions). I know it was done that way > earlier too, thus if you could cleanup it, then even better. > > ::: src/server/tests/test-set-oof-settings.c > @@ +34,3 @@ > #include "utils.h" > > +void oof_settings_submit_test_run (); > > Use 'void' please. Argh! I didn't squash the patch adding void in these functions declarations, sorry.
Created attachment 238696 [details] [review] Bug #695177 - server/tests: fix make check - fix arguments passed e_ews_connection_create_folder - fix typo: get_delegate -> info - drop deprecated g_thread_init call - replace OOFSettings by EEwsOofSettings - fix codying style: function_name -> function_name (void) - disable getattchaments tests for now (it'll be rewrite in a near future)
Review of attachment 238696 [details] [review]: Looks good, thanks. Fix the only one thing and feel free to commit to master. ::: src/server/tests/test-libews.c @@ +51,3 @@ g_test_add_func ("/libews/cuditem", cuditem_tests_run); g_test_add_func ("/libews/getdelegate", get_delegate_tests_run); +// g_test_add_func ("/libews/getattachment", get_attachments_tests_run); C++-like comment :)
Pushed: https://git.gnome.org/browse/evolution-ews/commit/?id=9588878a8fb9ac190c5224956a356aef25f780e3