Autoload kernel config in the integration vm runner

pull/1017/merge^2
Davide Bertola 4 months ago
parent b7f919d9eb
commit ecbfea37ec

@ -299,7 +299,7 @@ jobs:
run: | run: |
set -euxo pipefail set -euxo pipefail
find test/.tmp -name '*.deb' -print0 | xargs -t -0 -I {} \ find test/.tmp -name '*.deb' -print0 | xargs -t -0 -I {} \
sh -c "dpkg --fsys-tarfile {} | tar -C test/.tmp --wildcards --extract '*vmlinuz*' --file -" sh -c "dpkg --fsys-tarfile {} | tar -C test/.tmp --wildcards --extract '*vmlinuz*' --wildcards --extract '*config*' --file -"
- name: Run local integration tests - name: Run local integration tests
if: runner.os == 'Linux' if: runner.os == 'Linux'

@ -340,6 +340,28 @@ pub fn run(opts: Options) -> Result<()> {
} }
} }
} }
// Copy kernel configs as well (based on Debian path conventions)
let config_path = PathBuf::from(
kernel_image
.to_string_lossy()
.replace("vmlinuz-", "config-"),
);
if config_path.exists() {
let mut destination = PathBuf::from("/boot");
destination.push(config_path.file_name().expect("filename"));
for bytes in [
"dir /boot 0755 0 0\n".as_bytes(),
"file ".as_bytes(),
destination.as_os_str().as_bytes(),
" ".as_bytes(),
config_path.as_os_str().as_bytes(),
" 0755 0 0\n".as_bytes(),
] {
stdin.write_all(bytes).expect("write");
}
}
// Must explicitly close to signal EOF. // Must explicitly close to signal EOF.
drop(stdin); drop(stdin);

Loading…
Cancel
Save