From 1aa09f33462b45f8c32c76b6f10e8655bf942fd0 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 15 Nov 2022 11:56:28 +0100 Subject: [PATCH] docs: make code-block indents consistent Acked-by: Alyssa Rosenzweig Part-of: --- docs/ci/LAVA.rst | 10 +++--- docs/ci/bare-metal.rst | 92 ++++++++++++++++++++++++------------------------ docs/ci/index.rst | 18 +++++----- docs/ci/local-traces.rst | 16 ++++----- 4 files changed, 68 insertions(+), 68 deletions(-) diff --git a/docs/ci/LAVA.rst b/docs/ci/LAVA.rst index 791a335..08971a0 100644 --- a/docs/ci/LAVA.rst +++ b/docs/ci/LAVA.rst @@ -61,16 +61,16 @@ the web interface, and create an API token. Copy that into a .. code-block:: yaml - default: - token: - uri: - username: gitlab-runner + default: + token: + uri: + username: gitlab-runner Add a volume mount of that ``lavacli.yaml`` to ``/etc/gitlab-runner/config.toml`` so that the Docker container can access it. You probably have a ``volumes = ["/cache"]`` already, so now it would be:: - volumes = ["/home/anholt/lava-config/lavacli.yaml:/root/.config/lavacli.yaml", "/cache"] + volumes = ["/home/anholt/lava-config/lavacli.yaml:/root/.config/lavacli.yaml", "/cache"] Note that this token is visible to anybody that can submit MRs to Mesa! It is not an actual secret. We could just bake it into the diff --git a/docs/ci/bare-metal.rst b/docs/ci/bare-metal.rst index 3b7e29e..ee6b427 100644 --- a/docs/ci/bare-metal.rst +++ b/docs/ci/bare-metal.rst @@ -56,23 +56,23 @@ done using dnsmasq on the runner host. For example, this snippet in the dnsmasq.conf.d in the google farm, with the gitlab-runner host we call "servo":: - dhcp-host=1c:69:7a:0d:a3:d3,10.42.0.10,set:servo + dhcp-host=1c:69:7a:0d:a3:d3,10.42.0.10,set:servo - # Fixed dhcp addresses for my sanity, and setting a tag for - # specializing other DHCP options - dhcp-host=a0:ce:c8:c8:d9:5d,10.42.0.11,set:cheza1 - dhcp-host=a0:ce:c8:c8:d8:81,10.42.0.12,set:cheza2 + # Fixed dhcp addresses for my sanity, and setting a tag for + # specializing other DHCP options + dhcp-host=a0:ce:c8:c8:d9:5d,10.42.0.11,set:cheza1 + dhcp-host=a0:ce:c8:c8:d8:81,10.42.0.12,set:cheza2 - # Specify the next server, watch out for the double ',,'. The - # filename didn't seem to get picked up by the bootloader, so we use - # tftp-unique-root and mount directories like - # /srv/tftp/10.42.0.11/jwerner/cheza as /tftp in the job containers. - tftp-unique-root - dhcp-boot=tag:cheza1,cheza1/vmlinuz,,10.42.0.10 - dhcp-boot=tag:cheza2,cheza2/vmlinuz,,10.42.0.10 + # Specify the next server, watch out for the double ',,'. The + # filename didn't seem to get picked up by the bootloader, so we use + # tftp-unique-root and mount directories like + # /srv/tftp/10.42.0.11/jwerner/cheza as /tftp in the job containers. + tftp-unique-root + dhcp-boot=tag:cheza1,cheza1/vmlinuz,,10.42.0.10 + dhcp-boot=tag:cheza2,cheza2/vmlinuz,,10.42.0.10 - dhcp-option=tag:cheza1,option:root-path,/srv/nfs/cheza1 - dhcp-option=tag:cheza2,option:root-path,/srv/nfs/cheza2 + dhcp-option=tag:cheza1,option:root-path,/srv/nfs/cheza1 + dhcp-option=tag:cheza2,option:root-path,/srv/nfs/cheza2 See ``src/freedreno/ci/gitlab-ci.yml`` for an example of Servo on cheza. Note that other Servo boards in CI are managed using LAVA. @@ -104,22 +104,22 @@ Setting that up looks something like: .. code-block: console - Switch> - Password: - Switch#configure terminal - Switch(config)#interface Vlan 1 - Switch(config-if)#ip address 10.42.0.2 255.255.0.0 - Switch(config-if)#end - Switch(config)#snmp-server community mesaci RW - Switch(config)#end - Switch#copy running-config startup-config + Switch> + Password: + Switch#configure terminal + Switch(config)#interface Vlan 1 + Switch(config-if)#ip address 10.42.0.2 255.255.0.0 + Switch(config-if)#end + Switch(config)#snmp-server community mesaci RW + Switch(config)#end + Switch#copy running-config startup-config With that set up, you should be able to power on/off a port with something like: .. code-block: console - % snmpset -v2c -r 3 -t 30 -cmesaci 10.42.0.2 1.3.6.1.4.1.9.9.402.1.2.1.1.1.1 i 1 - % snmpset -v2c -r 3 -t 30 -cmesaci 10.42.0.2 1.3.6.1.4.1.9.9.402.1.2.1.1.1.1 i 4 + % snmpset -v2c -r 3 -t 30 -cmesaci 10.42.0.2 1.3.6.1.4.1.9.9.402.1.2.1.1.1.1 i 1 + % snmpset -v2c -r 3 -t 30 -cmesaci 10.42.0.2 1.3.6.1.4.1.9.9.402.1.2.1.1.1.1 i 4 Note that the "1.3.6..." SNMP OID changes between switches. The last digit above is the interface id (port number). You can probably find the right OID by @@ -140,17 +140,17 @@ something like this to register a fastboot board: .. code-block:: console - sudo gitlab-runner register \ - --url https://gitlab.freedesktop.org \ - --registration-token $1 \ - --name MY_BOARD_NAME \ - --tag-list MY_BOARD_TAG \ - --executor docker \ - --docker-image "alpine:latest" \ - --docker-volumes "/dev:/dev" \ - --docker-network-mode "host" \ - --docker-privileged \ - --non-interactive + sudo gitlab-runner register \ + --url https://gitlab.freedesktop.org \ + --registration-token $1 \ + --name MY_BOARD_NAME \ + --tag-list MY_BOARD_TAG \ + --executor docker \ + --docker-image "alpine:latest" \ + --docker-volumes "/dev:/dev" \ + --docker-network-mode "host" \ + --docker-privileged \ + --non-interactive For a Servo board, you'll need to also volume mount the board's NFS root dir at /nfs and TFTP kernel directory at /tftp. @@ -178,9 +178,9 @@ board's runner, set ``limit = 1`` ("only 1 job served by this board at a time"). Finally, add the board-specific environment variables required by your bare-metal script, something like:: - [[runners]] - name = "google-freedreno-db410c-1" - environment = ["BM_SERIAL=/dev/ttyDB410c8", "BM_POWERUP=google-power-up.sh 8", "BM_FASTBOOT_SERIAL=15e9e390", "FDO_CI_CONCURRENT=4"] + [[runners]] + name = "google-freedreno-db410c-1" + environment = ["BM_SERIAL=/dev/ttyDB410c8", "BM_POWERUP=google-power-up.sh 8", "BM_FASTBOOT_SERIAL=15e9e390", "FDO_CI_CONCURRENT=4"] The ``FDO_CI_CONCURRENT`` variable should be set to the number of CPU threads on the board, which is used for auto-tuning of job parallelism. @@ -196,7 +196,7 @@ want a pass-through HTTP cache. On your runner box, install nginx: .. code-block:: console - sudo apt install nginx libnginx-mod-http-lua + sudo apt install nginx libnginx-mod-http-lua Add the server setup files: @@ -215,13 +215,13 @@ Enable the site and restart nginx: .. code-block:: console - sudo ln -s /etc/nginx/sites-available/fdo-cache /etc/nginx/sites-enabled/fdo-cache - sudo service nginx restart + sudo ln -s /etc/nginx/sites-available/fdo-cache /etc/nginx/sites-enabled/fdo-cache + sudo service nginx restart - # First download will hit the internet - wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace - # Second download should be cached. - wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace + # First download will hit the internet + wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace + # Second download should be cached. + wget http://localhost/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public/itoral-gl-terrain-demo/demo.trace Now, set ``download-url`` in your ``traces-*.yml`` entry to something like ``http://10.42.0.1:8888/cache/?uri=https://s3.freedesktop.org/mesa-tracie-public`` diff --git a/docs/ci/index.rst b/docs/ci/index.rst index c6021a3..0e7e704 100644 --- a/docs/ci/index.rst +++ b/docs/ci/index.rst @@ -148,7 +148,7 @@ artifacts. Or, you can add the following to your job to only run some fraction .. code-block:: yaml - variables: + variables: DEQP_FRACTION: 10 to just run 1/10th of the test list. @@ -181,10 +181,10 @@ lines in ``/etc/gitlab-runner/config.toml``, for example: .. code-block:: toml - concurrent = 2 + concurrent = 2 - [[runners]] - environment = ["FDO_CI_CONCURRENT=16"] + [[runners]] + environment = ["FDO_CI_CONCURRENT=16"] Docker caching @@ -227,7 +227,7 @@ don't personally have. If you're experiencing this with the CI builds, you can use Docker to use their build environment locally. Go to your job log, and at the top you'll see a line like:: - Pulling docker image registry.freedesktop.org/anholt/mesa/debian/android_build:2020-09-11 + Pulling docker image registry.freedesktop.org/anholt/mesa/debian/android_build:2020-09-11 We'll use a volume mount to make our current Mesa tree be what the Docker container uses, so they'll share everything (their build will @@ -239,16 +239,16 @@ useful for debug). Extract your build setup variables from .. code-block:: console - IMAGE=registry.freedesktop.org/anholt/mesa/debian/android_build:2020-09-11 - sudo docker pull $IMAGE - sudo docker run --rm -v `pwd`:/mesa -w /mesa $IMAGE env PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ GALLIUM_DRIVERS=freedreno UNWIND=disabled EXTRA_OPTION="-D android-stub=true -D llvm=disabled" DRI_LOADERS="-D glx=disabled -D gbm=disabled -D egl=enabled -D platforms=android" CROSS=aarch64-linux-android ./.gitlab-ci/meson-build.sh + IMAGE=registry.freedesktop.org/anholt/mesa/debian/android_build:2020-09-11 + sudo docker pull $IMAGE + sudo docker run --rm -v `pwd`:/mesa -w /mesa $IMAGE env PKG_CONFIG_PATH=/usr/local/lib/aarch64-linux-android/pkgconfig/:/android-ndk-r21d/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/pkgconfig/ GALLIUM_DRIVERS=freedreno UNWIND=disabled EXTRA_OPTION="-D android-stub=true -D llvm=disabled" DRI_LOADERS="-D glx=disabled -D gbm=disabled -D egl=enabled -D platforms=android" CROSS=aarch64-linux-android ./.gitlab-ci/meson-build.sh All you have left over from the build is its output, and a _build directory. You can hack on mesa and iterate testing the build with: .. code-block:: console - sudo docker run --rm -v `pwd`:/mesa $IMAGE ninja -C /mesa/_build + sudo docker run --rm -v `pwd`:/mesa $IMAGE ninja -C /mesa/_build Running specific CI jobs ------------------------ diff --git a/docs/ci/local-traces.rst b/docs/ci/local-traces.rst index 1435b2a..ced5457 100644 --- a/docs/ci/local-traces.rst +++ b/docs/ci/local-traces.rst @@ -14,7 +14,7 @@ A simple run to see the output of the trace can be done with .. code-block:: console - apitrace replay -w name_of_trace.trace + apitrace replay -w name_of_trace.trace For more information, look into the `Apitrace documentation `__. @@ -22,9 +22,9 @@ For comparing checksums use: .. code-block:: console - cd piglit/replayer - export PIGLIT_SOURCE_DIR="../" - ./replayer.py compare trace -d test path/name_of_trace.trace 0 # replace with expected checksum + cd piglit/replayer + export PIGLIT_SOURCE_DIR="../" + ./replayer.py compare trace -d test path/name_of_trace.trace 0 # replace with expected checksum Simulating CI trace job @@ -36,10 +36,10 @@ Download the YAML file from your driver's ``ci/`` directory and then change the .. code-block:: console - # The PIGLIT_REPLAY_DEVICE_NAME has to match name in the YAML file. - export PIGLIT_REPLAY_DEVICE_NAME='your_device_name' - export PIGLIT_REPLAY_DESCRIPTION_FILE='path_to_mesa_traces_file.yml' - ./piglit run -l verbose --timeout 300 -j10 replay ~/results/ + # The PIGLIT_REPLAY_DEVICE_NAME has to match name in the YAML file. + export PIGLIT_REPLAY_DEVICE_NAME='your_device_name' + export PIGLIT_REPLAY_DESCRIPTION_FILE='path_to_mesa_traces_file.yml' + ./piglit run -l verbose --timeout 300 -j10 replay ~/results/ Note: For replaying traces, you may need to allow higher GL and GLSL versions. You can achieve that by setting  ``MESA_GLSL_VERSION_OVERRIDE`` and ``MESA_GL_VERSION_OVERRIDE``. -- 2.7.4