With native false, mixer will run in a container by default, so update
the bat tests to run native since they already will run in a container.
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
Use TOML format as the default mixer format. The INI format can still be
used by setting the --new-config flag to false during init.
This change also makes TOML the default format for the bat tests.
Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
This patch adds temporary tests for the format bump feature. A permanent
test will require the generation of custom docker images with an updated
build of mixer. Until this tooling is available, this test provides a
minimum integrity check on the feature.
The added test checks the operation of a format bump on a real format
boundary. In addition, it checks the integrity of 4 key values:
- image/LasT_VER should point to the +20 version
- Previous version in +20 MoM should point to +0
- Previous version in +10 MoM should point to +0
- FORMAT property in builder.conf should have the +20 format
Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
The BATS tests relied on the hack that creating an empty mixbundles list
before running 'mixer init' caused the default bundles to be skipped.
This patch uses the new '--no-default-bundles' flag to do this properly.
Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
The name used in battests for config set were using the name used in the
code for the properties instead of the name found in the config file
causing the test to fail.
Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
LOCAL_BUNDLE_DIR and LOCAL_REPO_DIR must be added using TOML format.
This patch changes bat tests to try to use new-config for setting the
properties. If it fails, it will fall back to appending INI properties
to the end of the file.
Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
Allow global arguments to be passed to mixer during `make batcheck`
through the $MIXARGS environment variable.
Signed-off-by: Rodrigo Chiossi <rodrigo.chiossi@intel.com>
This patch significantly overhauls the BATS tests for building mixes,
with the goal of reducing redundancy and increasing accuracy.
Each of the following concepts is only tested once:
- Building a mix with a full, real upstream bundle
- Updating the version of a mix (technically tested twice)
- Adding a bundle to a mix
- Removing a bundle from a mix
- Building a mix with a custom local bundle
- Adding a custom package to an upstream bundle
- Adding an upstream package to a custom bundle
Because all but one of the tests use stripped down versions of upstream
bundles for efficiency, they all test:
- Building a mix with a local, edited upstream bundle
This dramatically reduces the number of actual builds that occur.
The test descriptions accurately describe what the tests are actually
doing, and they report if they are using stripped down versions of upstream
bundles.
Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
The mixerlib file and the CLEANDIRS variable in all of the individual
bat Makefiles still pointed to the old "local" and "rpms" directories in
some locations.
This, made 'make batclean' not clean up directories correctly. This likely
made some of the tests not actually do what they were supposed to do, as it
was looking for rpms in 'local-rpms', but putting them in 'rpms'.
This patch also updates the url for the "json-c" rpm, as the previous url no
longer is active and was to a source rpm.
Signed-off-by: Kevin C. Wells <kevin.c.wells@intel.com>
Recent changes deprecated the use of individual bundle chroots when
building bundle contents and moved away from using yum to using dnf.
Because of this much of our variable and file names and comments were
inconsistent with the implementation.
This includes a change to make 'mixer build chroots' an alias to 'mixer
build bundles' and updates to the bat tests to call the new 'mixer build
bundles' command. This is not a breaking change since 'mixer build
chroots' behaves the way it always has (except internally with the
recent changes mentioned).
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Touch mixbundles so it does not get autopopulated by init, and use
os-core in the builder.conf so we do not have to include os-core-update.
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>
These tests should be reporting on the structure and correctness of mixer
and its user interface. Due to them running very slowly on the Travis CI
environment, they are not run by default, but can be run locally with
make batcheck.
This patch also introduces a docker container to do the build, so we do not
have to worry about running this in different environments such as Travis
CI. The tests are thus confined to a strict, well-known workspace,
and we can avoid many dependency problems.
Signed-off-by: Tudor Marcu <tudor.marcu@intel.com>