Commit Graph

13 Commits

Author SHA1 Message Date
Vadim Yanitskiy 90ba826c6b tests: use -no-install libtool flag to avoid ./lt-* scripts
This option should be used for any executables which are used only
for testing, or for generating other files and are consequently never
installed.  By specifying this option, we are telling Libtool that
the executable it links will only ever be executed from where it is
built in the build tree.  Libtool is usually able to considerably
speed up the link process for such executables.

Change-Id: Ib5402f99805437ad1ea49792b99434b57b616a2f
2023-03-13 04:19:23 +07:00
Vadim Yanitskiy 89c1082b3d Make RTP payload type configurable
For a long time the RTP payload type was hard-coded for outgoing
frames. The problem is that according to RFC 3551 only GSM FR has
a static payload type value (see table 4, value 3). For other
codecs the payload type may be negotiated between the both
sides dynamically (i.e. in range 96-127).

Let's allow a binary/API user to configure this manually.

Change-Id: Ia07ed4e13b4a70c8bb4181564a8190861fd269da
Closes: OS#2482
2018-07-09 22:16:45 +07:00
Vadim Yanitskiy 62717b6375 build: fix packaging problems and make distcheck happy
The 'distcheck' rule performs all of the operations associated with
packaging a distribution and verifying that the distribution works.

There were several problems:

  - libgsmhr/ 'patches' dir was not listed in EXTRA_DIST
  - libgsmhr/ (dist)clean targets wan't defined properly
  - tests/ 'ref-files' dir was not listed in EXTRA_DIST
  - tests/ wrong path was used for io_sample.txt

Change-Id: Ieb8f6a2a81f9b75c8c6c5db443b0e7be02bc4153
2018-07-09 22:15:39 +07:00
Vadim Yanitskiy 58c4bc68c8 tests: make both Valgrind and LeakSanitizer happy
The talloc_enable_null_tracking() actually allocates a new talloc
context, which makes both Valgrind and LeakSanitizer angry. This
context should be freed by the talloc_disable_null_tracking().

Change-Id: Ia660d2fdac720f685c0186720d0a476d7e9468be
2018-07-03 15:27:47 +00:00
Vadim Yanitskiy b29b981092 fix: conditionally enable 'ecu/ecu_fr_test'
In the 'ecu/ecu_fr_test' we have a processing queue with Full Rate
decoder block, which depends on libgsm. If libgsm isn't available,
the test will fail. Let's enable this test conditionally.

Change-Id: I74cf0e9de1e2f65e7227ee1565f12622bb55cabe
2018-07-03 15:27:47 +00:00
Vadim Yanitskiy 3f22f18790 Implement ECU (Error Concealment Unit) block for FR
In I06a21f60db01bfe1c2b838f93866fad1d53fdcd1 the Error Concealment
Unit API for FR codec was introduced. This change implements a
corresponding block.

Note: at the moment, only Full Rate is supported by the ECU API.

Change-Id: Ia929ee04f6be3d842c6ef7bc40cce0fdab16e90a
2018-06-29 20:54:04 +07:00
Vadim Yanitskiy 35c45f2dc5 tests: enable / disable codec tests conditionally
As the libosmogapk actually relies on external libraries for
audio coding, we should enable / disable particular codec
tests depending on the build configuration.

Closes: OS#2926
Change-Id: Ie4711294c43ff88b17431615883abf96d1ae02a6
2018-02-12 01:32:43 +07:00
Vadim Yanitskiy 6f34c8f301 procqueue: introduce and use shared cat_name definitions
Let's use the common string representation for item category
names, defined in the shared header, instead of defining
them in every file.

Change-Id: Ie0c449d77fa383cad27f67b8ce902bd071342dbb
2018-01-15 00:25:44 +06:00
Vadim Yanitskiy f59f3f1ba8 tests: add format / codec transcoding tests
This test group is intended to check the format / codec transcoding
capabilities of the library. The reference files are used to ensure
that encoding or decoding was successful.

The following formats are currently being tested:

  - amr_efr
  - gsm
  - racal_hr
  - racal_fr
  - racal_efr
  - ti_hr
  - ti_fr
  - ti_efr
  - rtp_efr
  - rtp_hr_etsi
  - rtp_hr_ietf
2017-12-31 12:21:00 +01:00
Vadim Yanitskiy 9d2b15dc8a tests: add pq_rtp test
This test is intended to check the RTP source / sink operability.
To do this, two processing queues are being allocated:

  "generator": source/random -> sink/rtp
  "checker": source/rtp -> sink/checker

The first one generates some amount of random bytes (payload),
and stores them inside a buffer that is shared between both

After generation, a payload is being sent from the first
queue via an RTP sink, and then being received by the second
via an RTP source.

As both queues do use a shared buffer, the last item of the
second queue (named 'sink/checker') is able to compare a
received payload with expected.
2017-12-31 12:21:00 +01:00
Vadim Yanitskiy 3e9e57fb40 tests: add pq_file test
This test is intended to check the file source / sink
operability. To do that, the following processing chain
is being composed:

  source/file -> proc/dummy -> sink/file (stdout)

The source item opens the sample file named 'io_sample.txt'
for reading. The next processing item simply converts all
uppercase latters to the lowercase. The last one writes
the result to stdout.

This processing cycle is being repeated several times
with different block length values.
2017-12-31 12:21:00 +01:00
Vadim Yanitskiy 1fe6a9b9ed tests: add procqueue test
This test is intended to validate the processing queue
management API. Moreover, the talloc debugging API is
used to ensure that there are no memory leaks.

First, four processing queues are being allocated. One
of them is empty, while others have different count of
items. Then the human-readable description is being
generated for all of them. And finally, the processing
and exit cllback are being tested.

During the test execution, the talloc NULL-context
tracking feature is enabled, allowing to observe every
memory allocation within the libosmogapk, and to detect
memory leaks.
2017-12-31 12:21:00 +01:00
Vadim Yanitskiy f069eb37fe Init automake test environment 2017-12-31 12:21:00 +01:00