Command.run() currently has a bit of a confusing behavior: if raise_on_error is
False and the executable is not found, then a weird CommandT is returned (return
code is -1 and stdout+stderr is None). This makes it possible to hanlde command
not found errors separately, but it makes that needlessly verbose. So instead,
let's just return None in *this* special case.
That in turn uncovered, that in most cases when we set `raise_on_error=True`, we
actually want an error if the command is not present but no error if the command
fails to execute (e.g. because it returns -1 if you run `$cmd --version`). Hence we
introduce the flag `raise_on_command_not_found`, which causes an exception to
be raised if the command is not found. This makes it independent of the
`raise_on_error` flag.
Additionally, we add a small optimization: if command starts with /, then we
assume it's a full path and we omit the call to which (and just check whether it
exists).
Co-authored-by: Marcus Schäfer <marcus.schaefer@gmail.com>
If we cherry-pick from main to master the compliance check
will notice that a commit already exists. This is not an error
and we can allow to continue the picking via --allow-empty
The github action to do this was still based on py3.6
but the latest changes on tox.ini requires a newer version
of tox which doesn't exist for py3.6. Thus run the workflow
on a newer python version
tox >= 3.0.15 together with virtualenv >= 20.17.1 raises
strange incompatibilities and prevents the unit test run
because tox calls virtualenv in a wrong way leading to
strange error messages like:
---
usage: virtualenv ...
virtualenv: error: argument dest: destination '{check,devel,packagedoc,doc,doc_gh_pages,doc_suse,doc_man,scripts,}: /home/runner/work/kiwi/kiwi/.tox/3\n/home/runner/work/kiwi/kiwi/.tox/3.8' must not contain the path separator (:) as this would break the activation scripts
---
All this doesn't make sense to me at all and worked
without any issues before.
The ci-update-build-tests action used a wrong variable
name which does not exist in the github secrets. This
commit fixes it and uses the correct variable name
This commit provides a new github action which sends
API requests to the OBS api to refresh the source
services for the integration tests on the OBS server
side. This Fixes#1980
It happens too often that the failure on running the
container causes failed results which are not actually
failures. I have hope that #1944 stabilize this
Moving the linter and unit tests to github workflows and
out of the gitlab CI system has the advantage that pull
request from forked repos will run the tests. In the long
run I think we should move away completely from gitlab CI
and use github actions as this will reduce the number of
external services used in the kiwi project. This commit
starts with the most simple parts: unit and type tests,
doc rendering and code style
Add integration tests for functions.sh
Implement a container based test system to run shell code for testing.
The concept utilizes pytest-testinfra and runs a container per test.
The nested container in a container feature is supported by the github
actions workflow. Thus the integration of this testing concept runs in
the github actions CI rather than on gitlab