Commit Graph
15 Commits
Author SHA1 Message Date
Otavio Pontes ebd7b0dbc6 list: Move strcmp related function to string.h
It makes more sense to have this grouped in string.h then list.h

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-28 12:57:58 -07:00
Otavio Pontes 96061a06d7 list: Improvements in list API
- Better documentation on header file
 - Renaming all functions that requires the list to be sorted to add
   a prefix list_sorted_
 - Make sure all functions are calling list_head() and list_tail()
   when needed

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-28 12:57:58 -07:00
Otavio Pontes bb1559ef6e compliant: Add check for trailing whitespaces on tests
Note that the clang-format already does this for the source code

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-04 16:05:21 -07:00
Otavio Pontes 1c250f442e list: Add function to filter out elements from a list
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-04 17:43:18 -05:00
Otavio Pontes d70f776dd5 manifest: Rename function to a proper name
And improve implementation using list API instead of reimplementing
search

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-10-04 17:43:18 -05:00
Otavio Pontes eb316d0a0e list: Adding unit test for list_deduplicate
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-09-25 09:09:25 -07:00
Otavio Pontes 69cd7d9395 test: Support running tests in a different directory
All files that are written by tests should be written in the directory
where the tests were executed and not the directory where code is.

Make distcheck now works fine

Fixes #343

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-09-13 15:35:03 -07:00
Otavio Pontes 6bf50db9bf test: Add missing NULL parameter to run_command() call
Last parameter was missing on a run_command() call and tests were breaking for some specific configurations.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-12 11:17:13 -07:00
Otavio Pontes f337da5b9c bundleadd: Rename flag from optional to also-add
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-07-08 13:58:24 -07:00
Castulo Martinez afc27768bd Parse optional bundles in manifests
This commit adds the ability to the manifest parser to recognize the
"optional" manifest header and to add those optional bundles in the
manifest to the manifest struct.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-07-03 14:59:47 -07:00
Otavio Pontes a4c00b4ed9 test: Move unit test datas to data/ directory
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-05-14 14:28:27 -07:00
Otavio Pontes a3a58b7319 test: Adding extra tests for signature
Test if certificates with Authority Information Access property set as critical
aren't used to validate swupd content.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-05-14 14:28:27 -07:00
Otavio Pontes db512848c7 signature: Add a unit test for signature
Create a unit test for signature checking.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-04-18 10:20:41 -07:00
Otavio Pontes aabc453fd1 manifest: Add manifest parser unit tests
Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-03-28 09:39:02 -07:00
Otavio Pontes 8648e83c33 test: Add first swupd unit test
Adding a unit test for string functions on string.h module.
Unit tests will help us to test functions that are hard to test
with function tests. String conversions, for example would be extremely
hard to test using functional tests.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2019-01-31 10:55:17 -08:00