Hello,

I have been attempting to add some rust checks to the flashrom gerrit test
script. I have 2 CLs and a request to change the jenkins job:

https://qa.coreboot.org/view/Flashrom/job/flashrom_gerrit

This patch installs 'cargo' to the jenkins docker image:

https://review.coreboot.org/c/coreboot/+/72001

This adds something like 1Gb to the docker image.

This patch adds the rust checks to the flashrom jenkins test_build script:

https://review.coreboot.org/c/flashrom/+/69770

However that script runs with no network, so something like this needs to
be added to the jenkins run script:

find -name Cargo.toml -execdir cargo fetch ';'

https://doc.rust-lang.org/cargo/commands/cargo-fetch.html

cargo fetch creates a Cargo.lock file, or updates one if it exists and is
no longer compatible with Cargo.toml (the checked in dependency
declarations). The lock file specifies which versions of the dependencies
to use.

Our jenkins setup will delete the Cargo.lock file every time during `git
clean`, I would like to check in the Cargo.lock file to avoid this problem.

https://doc.rust-lang.org/cargo/faq.html#why-do-binaries-have-cargolock-in-version-control-but-not-libraries

I was only able to test my changes inside a pre-built image from dockerhub,
as the TOT `make coreboot-jenkins-node` was not working for me. Here is
exactly what I did in the docker image:

apt update; apt install cargo rustfmt rust-clippy
su coreboot
cd /home/coreboot/node-root/workspace/
git clone https://review.coreboot.org/flashrom
git fetch https://review.coreboot.org/flashrom refs/changes/70/69770/3 &&
git checkout FETCH_HEAD
mkdir /home/coreboot/.cargo/
git ls-files | grep Cargo.toml | xargs -r -L1 sh -xc "cargo fetch
--manifest-path \$0"
encapsulate "$PWD|/tmp|/home/coreboot/.ccache|/home/coreboot/.cargo/"
./test_build.sh

Thanks
_______________________________________________
flashrom mailing list -- flashrom@flashrom.org
To unsubscribe send an email to flashrom-le...@flashrom.org

Reply via email to