Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
nmattia committed Nov 21, 2024
1 parent dcbbfc6 commit d6d13f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
4 changes: 2 additions & 2 deletions rs/tests/driver/src/driver/test_env_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ pub fn get_sha256_from_cas_url(img_name: &str, url: &Url) -> Result<String> {
}

pub fn get_ic_os_img_url() -> Result<Url> {
let url = std::env::var("ENV_DEPS__DEV_DISK_IMG_TAR_ZST_CAS_URL").unwrap();
let url = std::env::var("ENV_DEPS__DEV_DISK_IMG_TAR_ZST_CAS_URL")?;
Ok(Url::parse(&url)?)
}

Expand All @@ -1160,7 +1160,7 @@ pub fn get_ic_os_img_sha256() -> Result<String> {
}

pub fn get_malicious_ic_os_img_url() -> Result<Url> {
let url = std::env::var("ENV_DEPS__DEV_MALICIOUS_DISK_IMG_TAR_ZST_CAS_URL").unwrap(); // TODO:
let url = std::env::var("ENV_DEPS__DEV_MALICIOUS_DISK_IMG_TAR_ZST_CAS_URL")?;
Ok(Url::parse(&url)?)
}

Expand Down
10 changes: 3 additions & 7 deletions rs/tests/system_tests.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -83,28 +83,24 @@ def _run_system_test(ctx):
if k8s:
env["KUBECONFIG"] = ctx.file._k8sconfig.path

env["UPLOAD_SYSTEST_DEP"] = ctx.executable._upload_systest_deps.short_path
env["UPLOAD_SYSTEST_DEP"] = ctx.executable._upload_systest_dep.short_path

runtime_deps = [depset([ctx.file._k8sconfig])]

for target in ctx.attr.runtime_deps:
runtime_deps.append(target.files)

for e, t in env_deps.items():
runtime_deps.append(t.files)
env[e] = t.files.to_list()[0].short_path

for e, t in ctx.attr.icos_images.items():
runtime_deps.append(t.files)

return [
DefaultInfo(
executable = run_test_script_file,
runfiles = ctx.runfiles(
files = [
run_test_script_file,
ctx.executable.src,
ctx.executable._upload_systest_deps,
ctx.executable._upload_systest_dep,
ctx.version_file,
],
transitive_files = depset(
Expand All @@ -128,7 +124,7 @@ run_system_test = rule(
"env": attr.string_dict(allow_empty = True),
"_k8s": attr.label(default = "//rs/tests:k8s"),
"_k8sconfig": attr.label(allow_single_file = True, default = "@kubeconfig//:kubeconfig.yaml"),
"_upload_systest_deps": attr.label(executable = True, cfg = "exec", default = "//bazel:upload_systest_deps"),
"_upload_systest_dep": attr.label(executable = True, cfg = "exec", default = "//bazel:upload_systest_dep"),
"runtime_deps": attr.label_list(allow_files = True),
"env_deps": attr.string_keyed_label_dict(allow_files = True),
"icos_images": attr.string_keyed_label_dict(allow_files = True),
Expand Down

0 comments on commit d6d13f6

Please sign in to comment.