|
| 1 | +# Welcome to the Checkbox GFX project! |
| 2 | + |
| 3 | +This repository contains the Checkbox GFX Provider (GFX-specific test cases and test plans for [Checkbox]) as well as everything that is required to build the [checkbox-gfx] snap in the snapstore. |
| 4 | + |
| 5 | +# Checkbox GFX Provider |
| 6 | + |
| 7 | +Located in the `checkbox-provider-gfx` directory, it contains: |
| 8 | + |
| 9 | +- the test cases (also called "jobs" in the Checkbox jargon) and test plans to be run by Checkbox (in the `units` directory) |
| 10 | + |
| 11 | +# Requirements |
| 12 | + |
| 13 | +- Ubuntu Noble (24.04) |
| 14 | +- Supported hardware platforms: |
| 15 | + - Intel platforms with recent GPU (>= Broadwell) |
| 16 | + |
| 17 | +# Installation |
| 18 | + |
| 19 | +Install the Checkbox runtime and build/install the gfx provider snaps: |
| 20 | + |
| 21 | +```shell |
| 22 | +sudo snap install --classic snapcraft |
| 23 | +sudo snap install checkbox24 |
| 24 | +lxd init --auto |
| 25 | +git clone https://github.com/canonical/checkbox-gfx |
| 26 | +cd checkbox-gfx |
| 27 | +snapcraft |
| 28 | +sudo snap install --dangerous --classic ./checkbox-gfx_1.0_<arch>.snap |
| 29 | +``` |
| 30 | + |
| 31 | +Make sure that the provider service is running and active: |
| 32 | + |
| 33 | +```shell |
| 34 | +systemctl status snap.checkbox-gfx.run-agent.service |
| 35 | +``` |
| 36 | + |
| 37 | +# Install dependencies |
| 38 | + |
| 39 | +Most tests need dependencies, and a helper script is available to install each category of tests: |
| 40 | + |
| 41 | +```shell |
| 42 | +checkbox-gfx.install-lvl-zero |
| 43 | +checkbox-gfx.install-lvl-zero-rt |
| 44 | +checkbox-gfx.install-crucible |
| 45 | +checkbox-gfx.install-vulkan |
| 46 | +checkbox-gfx.install-opengl |
| 47 | +checkbox-gfx.install-opencl |
| 48 | +``` |
| 49 | + |
| 50 | +# Automated Run |
| 51 | + |
| 52 | +Each category of tests is run separately: |
| 53 | + |
| 54 | +```shell |
| 55 | +checkbox-gfx.test-lvl-zero |
| 56 | +checkbox-gfx.test-lvl-zero-rt |
| 57 | +checkbox-gfx.test-opencl |
| 58 | +``` |
| 59 | + |
| 60 | +Due to some tests causing dropped SSH connections, running the tests remotely should be done like this: |
| 61 | + |
| 62 | +1. Install checkbox-gfx on both the remote machine and the local machine |
| 63 | +2. From the checkbox-gfx directory, run the following command |
| 64 | + |
| 65 | +```shell |
| 66 | +checkbox-gfx.checkbox-cli control <REMOTE IP> bin/<test bin> |
| 67 | +``` |
| 68 | + |
| 69 | +# Develop the Checkbox GFX provider |
| 70 | + |
| 71 | +Since snaps are immutable, it is not possible to modify the content of the scripts or the test cases. Fortunately, Checkbox provides a functionality to side-load a provider on the DUT. |
| 72 | + |
| 73 | +Therefore, if you want to edit a job definition, a script or a test plan, run the following commands on the DUT: |
| 74 | + |
| 75 | +```shell |
| 76 | +cd $HOME |
| 77 | +git clone https://github.com/canonical/checkbox-gfx |
| 78 | +mkdir /var/tmp/checkbox-providers |
| 79 | +cp -r $HOME/checkbox-gfx/checkbox-provider-gfx /var/tmp/checkbox-providers/ |
| 80 | +``` |
| 81 | + |
| 82 | +You can then modify the content of the provider in `/var/tmp/checkbox-providers/checkbox-provider-gfx/`, and it's this version that will be used when you run the tests. |
| 83 | + |
| 84 | +Please refer to the [Checkbox documentation] on side-loading providers for more information. |
| 85 | + |
| 86 | +[Checkbox]: https://checkbox.readthedocs.io/ |
| 87 | +[Checkbox documentation]: https://checkbox.readthedocs.io/en/latest/side-loading.html |
0 commit comments