Rollback to provisioned before installing in reused containers (#557)
This is done because if a test run is interrupted midway through, reusing the container will actually break it (because the old run is still in the container files, leading checkbox to prompt for a restart/drop)
Fix metabox crash on already started containers (#558)
This also fixes the issue if the already started container is half baked by catching NotFound (config file) and deleting the old container
refactor: checkbox configs (#519)
* refactor: checkbox configs Instead of relying on a fairly baroque approach to storing and merging configs, this patch introduces a simpler way of handling those. The idea is that when the config object is created, it is filled with default values and it's getting updated with new values coming from other configs, launchers, and potentially a session-only values (with urwid screen in checkbox ui). This patch also makes checkbox track the origins of those values to help test authors, developers, and operators inspect testing setup. The `check-config` subcommand now prints the origins as well. This patch gets rid of the magical `Unset` value from configs in favor of normal python types. Co-authored-by: Hook25 <massimiliano.girardi@canonical.com>
Add RPL CPUIDs to the cpuid.py script (#559)
This change includes all RPL CPUIDs from edc.intel.com
* remove unused remote bits * bump remote API to 12
Update release process README (#554)
The release process was recently amended to: - publish Checkbox in beta channel/Testing PPA - let internal teams use it - push this version to stable if no problems are found The release process should therefore follow this by pushing the latest beta version to stable, then move on to the actual next release build process.
No longer ignore virtual watchdog (#561)
On some devices, the watchdog/detect Checkbox job fails to find any watchdog. This is because udevadm ignores virtual watchdogs by default (the reason behind it is that there used to be a machine with a large number of virtual watchdogs; see Launchpad MR[1] for more info). With more and more IoT devices using virtual watchdogs, checkbox-support has to take them into account. Fix CHECKBOX-345 [1]: https://code.launchpad.net/~jocave/checkbox-support/+git/checkbox-support/+merge/395442
Warn if any provider is sideloaded (#569)
* Warn if any provider is sideloaded * Be clear about who is using sideloaded providers
Move custom-app document to the how-to section (#572)
* Move custom-app document to how-to section Fix: CHECKBOX-671 * Update reference to the custom-app doc * Fix broken reference
Increase timeout of lid_close_suspend_open.sh (#575)
Some mobile workstations need more time when resume. So increase the timeout.
Add comments/context to explain why and how python-distro was patched…
… on s16/18 (#590) python3-distro was broken until the 1.6 release. See python-distro/distro#260
remove broken tests that fail provider validation (#592)
* remove broken tests that fail provider validation I tried making any sense of those jobs. The ptp4l one just runs a command that lists status of the ptp4l servvice. This succeds even when the service is inactive. The summary says the test checks if the service is running. The other one has two glaring problems: 1) it's a templated job and there's no resource specified that should be used to fill the values 2) the binary it calls is nowhere to be seen In other words it's completely broken and probably hasn't been tested by anyone. I checked if they are included in any of the test plans, and they're not meaning I didn't have to touch anything else. * Add tox tests for Intel IOTG provider Some jobs were added in that provider that broke our snap builds because they were not valid, but no validation was done on this provider. --------- Co-authored-by: Pierre Equoy <pierre.equoy@canonical.com>
Calculate version using setuptools scm (#534)
* Migrate setup.py -> pyproject.toml * Update mk-venv to use pyproject.toml * Migrate setup.py -> pyproject.py * Minor: Added missing fields to metadata * Migrate somekeys from pyproject.toml to setup.cfg This was done because on older versions of pip the previous setup does not work (even though it does not report any error). The previous version seems to work on `pip 23.1.2` but it does not install correctly at all (mainly: missing bins and missing package name) Also: sign was imported from main * Updated metabox config checking for source * Add isolated_build to tox.ini * Fixed install in tox.ini and updated run command * Removed unecessary editable install * Fixed install and run scripts * Avoid scm versioning in tox runs * Move scm bodge to the correct python version * Port dependencies to setup.cfg as well * Bodge: Install as dep requests-unixsocked in py3.6 * Port bodge to 3.5 * Use checkbox_ng.__version__ without hacking path * Fix relative install requirements.txt * Avoid dumping the full version number in the doc header * Remove outdated references to setup.py * Support multidigits tags * Re-include setup.cfg options field lost in rebase * Updated authors * Added pybuild plugin pyproject to build-req * Fix snap builds scm (#578) * Duplicated dependencies in pyproject.toml * Avoid copying by symlink in prepare.sh * Revert "Avoid copying by symlink in prepare.sh" This reverts commit 4812099. * Dump version in text file within series dir * Added bodges for setup.py and pretend version This was done to be backward compatible with any version that does not support pyproject.toml. Also, when building a snap via snapcraft we have no .git, so we need to dump the version before and load it via the file "pretending it" * Missing pipe concats commands breaking build * Fix version path * Fix setup scripts from setup.cfg -> pyproject.toml * Escape scripts name * Recovered all entrypoints not just scripts * Removed dynamic from startpoints * Quote names with spaces * Ported fix to series20 * Fixed definition of stress-ng and updated var export Amend: recovered tag, git init * Better setup_scm bodge * Backported to core16 * Ported to core18 * Fixed moved lib in series22 * Bodge 18 to support pyproject * Make dependencies local to jobs * Full build for series16 snap * Small guide on how to build checkbox-core-snap * Adopt version from version file * Fixed scm version of libraries * Update grep to support semantic versioning * Removed version calculation from github job * Dump version using setuptools_scm * adopt-info for checkbox-snap and checkbox-classic-snap * Minor: Info about operation being done in prepare.sh * Xenial support * Setuptools scm deb daily (#588) * Remove bumpversion configs and workflows * Pass the version generated by setuptools_scm to deb daily build recipes * Fixed line len to max 80 * Explained how to use the lxd backend and reordering * Updated requirements * Ensure that setup.py has the SETUPTOOLS_PRETEND_VERSION envvar * Ported envvar fix to 20 * Updated README.md as per feedback * Document versioning via setuptools_scm in prepare.sh * Minor: call launcher checkbox snap frontend and not user * Removed hack in requirements.txt for readthedocs.yaml Minor: Fixed typo in README.md --------- Co-authored-by: Sylvain Pineau <sylvain.pineau@canonical.com>
Bump the checkbox-support debhelper compatibility level to 10 (#594)
Required by pybuild-plugin-pyproject (same compat lvl as checkbox-ng)
Fixed sudo missing in apt get cmd (#593)
* Fixed sudo missing in apt get cmd * Also add dependency to non-core snaps
Fix remote builds snaps (#598)
* Missing pull breaks remote builds * Read setuptools_scm_pretend_version from staging
Removed the 18.04 launchers, cleaned remaining references to the 18.0…
…4 suite, updated the man page source. resolves SERVCERT-338 (#576)
Removed future and quoted type hint (#599)
Once we deprecate all py<2.9 we can use actual type hints, until that point this will remain quoted
Override the version number using the SETUPTOOLS_SCM_PRETEND_VERSION …
…variable (#600) checkbox-ng and checkbox-support deb packages are getting a 0.0.0 or 0.1.dev version number fpr the source package otherwise
* Fixed dependencies with version and missing after clause * Remove useless debian files * Minor: Removed space
fix: sleep for 10s between connection retries in BT A2DP test (#607)
Previously it was only a second which meant that the temporary radio blackouts may have been responsible for failing the test. This patch makes the testing script wait for quite a bit longer between retries.
Build-Depends on python3-setuptools-scm does set SETUPTOOLS_SCM_PRETE…
…ND_VERSION automatically (#609)
Remove parts-meta-info and unify return from get_version (#610)
* Remove parts-meta-info and unify return from get_version * Report just version string This also removes the get_version_info module as it is no longer necessary, replaces it all with just the main checkbox-ng version
Checkbox remote nomenclature documentation upgrade (#562)
* Run commands from the docs/ directory Following a discussion with the documentation team that led to the creation of a PR on their side[1], make sure to be in the docs/ directory before triggering the different commands. This should make woke work as expected. Please note that according to woke doc[2], the parameter to set this is "workdir". [1] canonical/sphinx-docs-starter-pack#40 [2] https://github.com/marketplace/actions/run-woke * Update glossary and clean up doc pages - Update glossary to include terms like DUT, Testbed, as well as Checkbox Controller and Checkbox Testbed - Clean up rst markup - Add links to glossary terms or other sections when it makes sense * Replace references to master and slave Fix CHECKBOX-658 * Rework the Checkbox remote interrupt screen explanation * Rework the page about the Checkbox remote service * Add words to spelling ignore list Not sure why testbed is marked as an unkown word, it's in the wiktionary: https://en.wiktionary.org/wiki/testbed * Fix rst reference to the launcher doc * Replace mentions of "testbed" with "agent" Following proposal to provide better naming for Checkbox remote[1], it was decided to use the following terms: - "controller" for the entity that connects to remote DUT - "agent" for the entity that runs on DUT or Zapper connected (directly attached via various interfaces) to DUT to execute tests Since "testbed" had been originally used for the second term in the first draft, this commit addresses the "testbed" -> "agent" change. [1] https://docs.google.com/document/d/1GuR5xudmxgZ3bRMSRcuy0bZyX3We3UvooP0WT_VcXSA/ * Rename [daemon] section of the launchers into [agent] section * Remove PyPI from glossary This was still useful when Checkbox was published on it, but it's not anymore. * Use warning instead of note for field deprecation comment * Address feedback regarding service and configs pages * Rename reference from DUT to Agent in configs page * Update remote explanation
Update stress ng version and dependencies in Checkbox snaps (#585)
Fix CHECKBOX-705 --------- Co-authored-by: Sylvain Pineau <sylvain.pineau@canonical.com>
Exclude the debian directory from source dist and wheel packages (#608)
* Exclude the debian directory from source dist and wheel packages * Remove the checkbox-[ng,support] debian folder from the snapcraft staging folders
Fix workflows to fetch the whole git history to establish the correct…
… version (#615) Remove unnecessary "sed" steps in checkbox (non core snaps) release workflows Versions are generated thanks to setuptools_scm now
Fix the metabox trigger so that it is runs to completion (#616)
* Fix the metabox trigger so that it is run to completion * Use wc -l instead of error code
Move the error to the exception to give non-0 return (#617)
This replaces all logger critical and empty SystemExit w/ a SystemExit with the logged message so that we get it AND a non-0 return code
Metabox revision testing (#591)
* Support revisions in metabox runner * Calculate metabox instance name with revision * Checkout revision on machine setup Minor: Avoid printing empty lines in debug * Describe steps with also revision Minor: s/HEAD/current because HEAD does not mean current revision * Minor: removed dbg print * Print progrss in info logger * Remove picking revisions * Minor: split scenario(s) prompt calculation * Fixed fmt is no longer part of class
Add: kernel snap refresh and revert tests (#551)
* Add: kernel snap refresh and revert tests
* kernel_revision_info to gather the kernel name, tracking,
and, revisions info of the kernel snap
* ubuntucore/kernel-refresh-{kernel} to refresh the kernel
to the stable channel
* ubuntucore/kernel-verify-after-refresh-{kernel} to verify
the kernel revision is the same as the one in stable channel
* ubuntucore/kernel-revert-{kernel} to revert the kernel
to the original installed revision
* ubuntucore/kernel-verify-after-revert-{kernel} to check
the revision is back to the original one
* Add: log revision info when refreshing/revertingFix Metabox fails to run in github action (#619)
* Raise the called process error instead of ignoring it * Upgrade pip to have --dry-run option * Missing chains __init__.py * Update setuptools to latest version * Add test_manifest init file * Support pyproject update in metabox Minor: Report revision and black run Metabox did not support the pyproject update when the base distro had a non updated pip version, this adds a pip update command and cleans up the install process a bit so that it is still readable * Create dir before creating service
Remove old AudioScenario (#620)
This was removed because its dependencies are heavy and we have decided to remove them a while back. The scenario is still here but it can not run (missing deps) and will make the test fail
Bump PyYAML version to 6.0.1 (#623)
This was done because 5.4.1 does not install anymore
Revert "Increase timeout of lid_close_suspend_open.sh (#575)" (#624)
This reverts commit 32081df.
Fix docs makefile to use local copy of checkbox-ng for version info (#…
…625) Install checkbox-ng from local repository rather than relying on outdated version in PyPI.
Fix Zapper-driven EDID cycling test case (#603)
* Fix: EDID cycling is asserting resolution with the wrong data * Change: unplug and plug back the HDMI
typos: fix a number of typos in comments; no functional change (#636)
Signed-off-by: Robert P. J. Day <robert.day@canonical.com>
Check for required Python lib in snap preparation scripts (#638)
The prepare*.sh scripts will fail to put the version number in the version.txt file if setuptools-scm package is not present on the system. Add a check to make sure it is, and a hint if it's not.