5 Commits
Author SHA1 Message Date
Otavio Pontes d61288464d tests: Auto rebalance tests based on how long they take to long
This patch adds 2 scripts used to balance test execution. The weight_tests.bash
runs all tests and sets a weight to them based on how long they take to run. The
other, filter_bats_list.bash, use this information to split the tests in groups to
be executed by github actions.
When a new test is added the script will consider it with an average weight, so this
shouldn't unbalance the system right away. After some time, if we notice that the
system is not balanced anymore we can just run the weight_tests.bash again to rebalance.

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2020-02-20 13:22:31 -08:00
Castulo Martinez f71b84f22d Renaming existing exit codes for consistency
Renaming codes following these rules:
- All codes should start with SWUPD_ so we never get confused what
code comes from swupd
- Always separate codes that contain multiple words using an underscore
SWUPD_MULTI_WORD_ERROR instead of using SWUPDMULTIWORDERROR
- Code 0 is reserved for SWUPD_SUCCESS (or SWUPD_OK)
- Code 1 is reserved to be used as "no" by commands that return a boolean
state (e.g. swupd autoupdate, check-update)

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2019-01-24 15:23:15 -08:00
Otavio Pontes 7ef9870365 global: Unify global parameters parsing.
There was a lot of copy and paste of parameters and parameters help, making it
hard to maintain global parameters sanity, like sanitizing values, keep help
updated and making sure all commands had the appropriate options.

Move all global parameters parsing to global.c and leave only specific parameters
to commands files.

Fixes: #571

Signed-off-by: Otavio Pontes <otavio.pontes@intel.com>
2018-12-06 14:50:00 -08:00
Castulo Martinez 26a748394f Adding IDs to bundle-remove tests
This commit adds the test ID to every bundle-remove test, removes
duplicates and make readability improvements.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2018-11-14 13:09:42 -08:00
Castulo Martinez 57e82bb51b Replacing old bundleremove tests
The old bundleremove tests used the swupdlib.bash library that was
replaced by testlib.bash.

This commit replaces those old bundleremove tests with new versions
of the same tests that now use testlib.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2018-09-27 12:48:14 -07:00