Message ID | 1464959308-38124-1-git-send-email-pboca@cloudbasesolutions.com |
---|---|
State | Changes Requested |
Headers | show |
Small nit: maybe rename the macro from OVS_SKIP_NON_ADMIN to OVS_SKIP_NON_ADMIN_WIN Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> > +dnl OVS_SKIP_NON_ADMIN() > +dnl > +dnl Checks if we have enough rights to create a service > +m4_define([OVS_SKIP_NON_ADMIN], > + [ > + AT_SKIP_IF([net session; test $? -ne 0]) > + ])
diff --git a/tests/daemon.at b/tests/daemon.at index 41c5d07..d85bfc8 100644 --- a/tests/daemon.at +++ b/tests/daemon.at @@ -2,6 +2,15 @@ AT_BANNER([daemon unit tests - C]) AT_SETUP([daemon]) AT_SKIP_IF([test "$IS_WIN32" = "yes"]) + +dnl OVS_SKIP_NON_ADMIN() +dnl +dnl Checks if we have enough rights to create a service +m4_define([OVS_SKIP_NON_ADMIN], + [ + AT_SKIP_IF([net session; test $? -ne 0]) + ]) + OVSDB_INIT([db]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([expected]) @@ -163,6 +172,8 @@ AT_CLEANUP AT_SETUP([daemon --service]) AT_KEYWORDS([windows-service]) AT_SKIP_IF([test "$IS_WIN32" != "yes"]) +OVS_SKIP_NON_ADMIN + OVSDB_INIT([db]) AT_CAPTURE_FILE([pid]) # To create a Windows service, we need the absolute path for the executable.
Check if we have enough rights to create a service on Windows otherwise we skip the test Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com> --- tests/daemon.at | 11 +++++++++++ 1 file changed, 11 insertions(+)