4 Commits
Author SHA1 Message Date
William Douglas 3338cb2c66 Rework clean-old-statedir test output checking
The order of files in this test aren't very completely stable so make
do with looking at output chunks that seem to be reasonably consistent
across different environments.

Signed-off-by: William Douglas <william.douglas@intel.com>
2023-02-17 12:58:05 -08:00
Castulo Martinez 7dd6fc221a Testlib: renaming variables for consistency
Environment variables are used everywhere in testilb. This environment
variables are global variables that define the way testlib behaves.
However is was confusing to use the variables because they were
inconsistent between each other, for example some variables that define
paths would have absolute paths while other would have relative paths,
making it error prone while using them.

This commit makes the environment variables more consistent by following
a name convention for each type of variable, as an example, variables
that define absolute paths follow this convention ABS_<path_name>_DIR,
while variables that define relative paths are defined like this
<path_name>_DIR.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-06-16 11:42:13 -07:00
Castulo Martinez defd541061 Fixing a false positive in a "clean" test
When checking the output of the "clean --dry-run" command in the test,
we expect the output to be shown in a specific order, but the order can
change depending on the system since readdir doesn't warranty a specific
order when reading the content of a directory.

This commit fixes the test by only checking for the files we are
intereseted in, and it checks them with separate assertions to make sure
we don't have false positives due to the order.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-06-08 15:40:29 -07:00
Castulo Martinez 40472f5a21 Updating "clean" to remove new and old cache dirs
"Swupd clean" removes cache from certain pre-defined directories. This
commit udpdates the locations where clean looks for cache so it includes
the new locations where the cache is stored.

Swupd will continue looking at old cache locations until the bump to
format 31.

Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
2020-06-08 12:10:39 -07:00