Commit graph

29 commits

Author SHA1 Message Date
Dan Winship bc003f6273 tools: fix test-networkmanager-service Settings.Connections
The test settings service wasn't exporting a Connections property.
2014-09-18 11:51:07 -04:00
Dan Winship c9fb96e02e libnm: add test-secret-agent
Implement some basic secret agent functionality in
test-networkmanager-service.py, and add test-secret-agent to test that
NMSecretAgent works as expected.
2014-09-09 12:16:38 -04:00
Thomas Haller 2ac34e437f libnm-glib/test: fix test failure for test-remote-settings-client
Due to behavioral change of test-networkmanager-service.py, the test
/remote_settings/remove_connection fails (test_remove_connection() at
test-remote-settings-client.c:318).

Fixes: 66a3480329
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-08-08 11:39:44 +02:00
Dan Winship 66a3480329 libnm: add a test for connection-deleted-while-being-created
Since NMRemoteSettings doesn't announce new connections until it has
fetched their properties, it's possible that a connection could get
deleted while we're waiting for it to be created. NMRemoteSettings has
code to deal with this, so add a test to make sure that it works.
2014-08-07 15:43:43 -04:00
Dan Winship 08b91199fb libnm-glib: make test-networkmanager-service.py automatically exit with its parent
test-nm-client.c and test-remote-settings-client.c were using their
own assertion macros so they could kill the test service on assertion
failure. Except that some new code didn't get the memo and used the
g_assert* macros. Not to mention that sometimes the tests would crash
outside of an assertion macro.

We can make test-networkmanager-service.py notice that its parent has
crashed by opening a pipe between them and taking advantage of the
fact that the pipe will be automatically closed if the parent crashes.
So then test-networkmanager-service.py just has to watch for that, and
exit if the pipe closes.

Then that lets us drop the test_assert* macros and just use g_assert*
instead.
2014-08-01 12:12:42 -04:00
Dan Winship 5432ef5e52 tools: move libnm-glib's fake NM service implementations here
Move libnm-glib's test-fake-nm.py and test-remote-settings-service.py
to tools/, merge them together into a single program, and fix a few
bugs (notably some missing signal emissions in the Settings service).

Although they are currently only used by libnm-glib's tests, they are
generic enough that they could be used by other code in the future
(and in particular, they will be used by libnm's tests as well).
2014-07-30 15:56:29 -04:00
Dan Winship efb2b13baa tools: move debug-helper.py from test/ to tools/ 2014-07-30 15:56:19 -04:00
Dan Winship 420e027c99 tools: dist everything
Dist run-test-valgrind.sh and test-sudo-wrapper.sh, since they may be
of use to people building from tarballs as well.
2014-07-30 15:56:19 -04:00
Dan Winship 07bb19a3bb tools: remove generate-settings-spec, which is no longer used 2014-06-19 17:45:02 -04:00
Thomas Haller 7a7dd9203d nmtst: add nmtst_reexec_sudo() function
Interpret environment variable NMTST_DEBUG which allows
to specify 'sudo-cmd=CMD'. If the test program calls
nmtst_reexec_sudo(), it will `exec CMD "$0" "$@"`.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-06-05 18:12:57 +02:00
Jiří Klimeš 98ae6e06d2 all: g_type_init() has been deprecated in GLib 2.35.0
g_type_init() deprecation:
https://bugzilla.gnome.org/show_bug.cgi?id=686161
2014-05-27 16:58:21 +02:00
Dan Winship 9c4d86ee80 libnm-util, libnm-glib: add versioned deprecation/availability macros
Add versioned NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros, and tag
new/deprecated functions accordingly. (All currently-deprecated
functions are assumed to have been deprecated in 0.9.10.)

Add NM_VERSION_MIN_REQUIRED and NM_VERSION_MAX_ALLOWED macros which
can be set to determine which versions will cause warnings.

With the current settings, external consumers of the
libnm-util/libnm-glib APIs will have MIN_REQUIRED and MAX_ALLOWED both
set to NM_VERSION_0_9_8 by default, meaning they will get warnings
about functions added in 0.9.10. NM internally sets
NM_VERSION_MAX_ALLOWED to NM_VERSION_NEXT_STABLE to ensure that it is
always allowed to use all APIs.
2014-02-13 11:24:37 -05:00
Jiří Klimeš a312aad848 tools: enhance description for the nm-settings manual page 2013-11-28 13:23:53 +01:00
Jiří Klimeš b26656f003 tools: add team, team-port and dcb settings into generate-settings-spec.c 2013-11-28 11:35:52 +01:00
Dan Winship bfce3f7dc8 build: switch from $(INCLUDES) to $(AM_CPPFLAGS) to make automake happy
Unfortunately, $(AM_CPPFLAGS) gets overridden by per-target _CPPFLAGS
variables, which $(INCLUDES) did not, so this requires some additional
changes.

In most places, I have just gotten rid of the per-target _CPPFLAGS
variables; in directories with a single target, the per-target
variable is unnecessary, and in directories with multiple targets, the
per-target variable is often undesirable, since it forces some files
to be compiled twice, even though there ends up being no difference
between the two files.
2013-08-22 11:49:16 -04:00
Pavel Šimerda 439473e9a4 valgrind: print absolute path
Relative paths in makefiles have different anchor than the current shell
directory.
2013-07-30 11:39:28 +02:00
Pavel Šimerda b38f76cdb4 build: use a helper script for all valgrind tests 2013-07-26 19:08:03 +02:00
Dan Winship b39b4e9cf3 man: fix distcheck
Also, we can get rid of tools/manpages-docbook.xsl and just specify
the canonical URL directly.
2013-05-02 11:40:21 -04:00
Jiří Klimeš 82fb1978a4 all: use G_VALUE_INIT to initialize GValue variables
It makes the initializations more explicit.
G_VALUE_INIT is available since glib 2.30, and NM now require glib >= 2.32
2013-03-25 08:41:18 +01:00
Dan Winship 3bd867bb62 build: remove glib-mkenums
This was imported to get a bugfix in glib 2.31.5; since we require
2.32 now, we can use the system glib-mkenums.
2013-02-26 13:07:32 +01:00
Dan Williams fbfb0fb947 build: manpages-docbook.xsl should be DIST-ed 2013-02-05 15:22:25 -06:00
Jiří Klimeš ac19edd96e man: generate nm-settings.5 manual page (bgo #673520)
We only generate the page when configured "--with-docs", because we need xsl
stylesheets that are pulled in by gtk-doc.
2013-02-05 18:26:16 +01:00
Jiří Klimeš 2981953e47 tools: move generate-settings-spec to tools 2013-02-05 18:25:03 +01:00
Dan Williams 27f3ebf708 tools: simplify symbol visiblity check script
Using nm is way simpler, and actually less error-prone.
2012-07-23 09:17:04 -05:00
Dan Winship 839eab5564 Use glib-mkenums to generate enum types
Rather than generating enum classes by hand (and complaining in each
file that "this should really be standard"), use glib-mkenums.

Unfortunately, we need a very new version of glib-mkenums in order to
deal with NM's naming conventions and to fix a few other bugs, so just
import that into the source tree temporarily.

Also, to simplify the use of glib-mkenums, import Makefile.glib from
https://bugzilla.gnome.org/654395.

To avoid having to run glib-mkenums for every subdirectory of src/,
add a new "generated" directory, and put the generated enums files
there.

Finally, use Makefile.glib for marshallers too, and generate separate
ones for libnm-glib and NetworkManager.
2012-02-15 11:42:15 -05:00
Dan Williams 07c9de48df libnm-util: fix symbol export checks to catch un-exported ones too
The current check caught stuff in the .ver file that was outdated, but
didn't quite get stuff that was supposed to be exported but wasn't,
in some cases.  Update the regex to ensure that symbols that are
not exported, but that start with "nm_" (and aren't GObject
boilerplate) get flagged during the check.

Update internal code to return to a previous pattern of treating symbols
that start with "_" internal, and expecting symbols that start with
"nm_" to be exported.

Also fixes cases where random glibc symbols would get flagged:

00040ff4 l     O *ABS*  00000000              .hidden _GLOBAL_OFFSET_TABLE_
00041380 l     O .data  00000000              .hidden __dso_handle
000406e8 l     O .dtors 00000000              .hidden __DTOR_END__
0000fbe4 l     F .text  00000000              .hidden __i686.get_pc_thunk.cx
0002f980 l     F .text  00000014              .hidden __stack_chk_fail_local
0000b1e7 l     F .text  00000000              .hidden __i686.get_pc_thunk.bx
00040e60 l     O *ABS*  00000000              .hidden _DYNAMIC
2011-05-05 12:26:17 -05:00
Dan Williams 235f96d2fd tools: add script to check library exports against .ver files 2011-03-21 12:23:51 -05:00
Dan Williams 22f1d21754 Distribute doc tools too
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3493 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 17:42:17 +00:00
Dan Williams 8d38d6ba74 add tools directory and xsl for spec generation
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3492 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
2008-03-24 16:47:39 +00:00