mirror of
https://gitlab.gnome.org/GNOME/libsecret.git
synced 2024-12-22 12:48:51 +00:00
b72048c920
Allow parallel building and testing by using a single Makefile.am Implement parallel testing using TAP, with various drivers and compilers living in the build/ directory. Fix all sorts of issues that this caused, including builddir != srcdir, leaks in tests and so on. It would have been nice to break out all the above into separate commits ... blush.
38 lines
1014 B
Vala
38 lines
1014 B
Vala
/*
|
|
* Copyright 2012 Red Hat Inc.
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Lesser General Public License as published
|
|
* by the Free Software Foundation; either version 2.1 of the licence or (at
|
|
* your option) any later version.
|
|
*
|
|
* See the included COPYING file for more information.
|
|
*/
|
|
|
|
private void test_read_alias () {
|
|
try {
|
|
var service = Secret.Service.get_sync(Secret.ServiceFlags.NONE);
|
|
var path = service.read_alias_dbus_path_sync("default", null);
|
|
GLib.assert (path != null);
|
|
} catch ( GLib.Error e ) {
|
|
GLib.error (e.message);
|
|
}
|
|
}
|
|
|
|
private static int main (string[] args) {
|
|
GLib.Test.init (ref args);
|
|
|
|
try {
|
|
MockService.start ("mock-service-normal.py");
|
|
} catch ( GLib.Error e ) {
|
|
GLib.error ("Unable to start mock service: %s", e.message);
|
|
}
|
|
|
|
GLib.Test.add_data_func ("/vala/unstable/read-alias", test_read_alias);
|
|
|
|
var res = GLib.Test.run ();
|
|
Secret.Service.disconnect ();
|
|
MockService.stop ();
|
|
return res;
|
|
}
|