mirror of
https://github.com/rust-vmm/rust-vmm-ci.git
synced 2026-08-05 03:08:31 +00:00
allow tests to define if_changed and crate_path
We now check whether the test defines if_changed and crate_path before using the ones from the workspace. If the tests does define these two, then we don't overwrite them with the default workspace configuration. This is needed so that custom pipelines for tests can specify as if changed the crate that they're intended to. Without this change we end up running the custom tests for all crates that are changed instead of running it just for the crate that they're intended. Signed-off-by: Andreea Florescu <andreea.florescu15@gmail.com>
This commit is contained in:
committed by
Manos Pitsidianakis
parent
84550804a4
commit
bfca469deb
@@ -356,7 +356,13 @@ class BuildkiteConfig:
|
||||
step_input = copy.deepcopy(test)
|
||||
step_input["platform"] = platform
|
||||
step_input["crate"] = crate
|
||||
step_input["crate_path"] = crate_path
|
||||
# We always allow the test description to overwrite global configurations.
|
||||
# To do so, we first check if the test definition has a `crate_path`, if yes, we use that. Otherwise, we
|
||||
# use the passed parameter `crate_path`. This also applies to "if_changed".
|
||||
crate_path = test.get("crate_path", crate_path)
|
||||
if crate_path is not None:
|
||||
step_input["crate_path"] = crate_path
|
||||
if_changed = test.get("if_changed", if_changed)
|
||||
if if_changed is not None:
|
||||
step_input["if_changed"] = if_changed
|
||||
if not step_input.get("hypervisor"):
|
||||
|
||||
Reference in New Issue
Block a user