Commit Graph

18 Commits

Author SHA1 Message Date
Daniel Elstner 4960aeb035 tests: Include <libsigrok/libsigrok.h>
This matches the global style and avoids the "../" path
components.
2015-08-16 18:28:13 +02:00
Uwe Hermann 338143ea03 Convert a few more occurrences of d->priv to d->context. 2015-07-10 18:19:24 +02:00
Uwe Hermann 032da34b78 sr_driver_list() now takes a context pointer.
This requires sr_hw_cleanup_all() and sanity_check_all_drivers()
to also take a context.

The (runtime) generation of the driver list now happens in sr_init()
and sr_driver_list() always returns that pre-generated list. This fixes
a segfault when (correctly) invoking multiple sr_init() and sr_exit()
calls with different contexts (caught by the unit tests).

This fixes bug #565.
2015-04-07 02:09:56 +02:00
Uwe Hermann 924866d48d uni tests: Use sr_dev_inst_channels_get() to fix the build. 2014-11-11 21:28:16 +01:00
Uwe Hermann 95bc772594 unit tests: Update to recent API changes. 2014-09-01 01:11:23 +02:00
Uwe Hermann 98de0c7874 tests: Factor out srtest_setup() and srtest_teardown(). 2014-08-11 13:20:50 +02:00
Bert Vermeulen a755b0e122 output: Finish output module API wrappers.
The sr_output and sr_output_module structs are now no longer accessible
from the client.
2014-07-26 03:57:17 +02:00
Uwe Hermann 6592c36995 Fix 'make check' invocation wrt new libsigrok.h location. 2014-07-20 12:03:29 +02:00
Uwe Hermann fca75cbb74 A few more random 'probe' to 'channel' changes.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 3f239f0803 Rename various *PROBE* macros to *CHANNEL*.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann ba7dd8bbb8 Replace 'probe' with 'channel' in most places.
Also, consistently use 'ch' for channel variables. This matches how we
consistently use sdi, devc, and so on all over the code-base.

This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 91aea754aa Rename 'struct sr_probe' to 'struct sr_channel' everywhere.
This fixes parts of bug #259.
2014-03-25 20:58:54 +01:00
Uwe Hermann 17794067f9 tests: Fix a few warnings.
Fix a bunch of "no previous prototype for ..." warnings exposed
by -Wmissing-prototypes.
2014-01-17 20:49:45 +01:00
Marvin Schmidt c3e2b08dc9 Fix test failure
The GError object has to initialized to NULL before being passed to
g_file_set_contents or it will throw the following critical warning

GLib-CRITICAL **: g_file_set_contents: assertion 'error == NULL || *error == NULL' failed

and return FALSE, which leads to failed assertion and subsequently
to the test failing
2013-12-07 12:25:18 +01:00
Uwe Hermann 57d0a2e195 unittests: Update for probe-groups changes. 2013-11-10 23:22:18 +01:00
Uwe Hermann 71185b48a1 Unit tests for 'binary' input format & version APIs. 2013-10-28 22:08:34 +01:00
Uwe Hermann 34e4c27391 unittests: Adapt to new GVariant system. 2013-04-12 17:59:38 +02:00
Uwe Hermann 79bb0e97d5 Add a testsuite for libsigrok.
This adds a suite of unit tests for libsigrok. It uses the 'Check'
tool/library (apt-get install check) to run the tests.

The configure tool tries to find libcheck. If it succeeds, a
"make check" will run all tests. Otherwise, none of the tests will
be built and "make check" will not run any tests.

This also means that users who don't have 'check' installed will still
be able to build and install libsigrok just fine.
2013-03-09 11:55:43 +01:00