From 589d8fd8a778177b761e4bd5cf2e165785a9643d Mon Sep 17 00:00:00 2001 From: Tiziano Santoro Date: Fri, 26 Jul 2024 11:21:42 +0000 Subject: [PATCH] Add justfile recipe to run tests This new recipe ensures that all the dependencies are rebuilt and up to date. As an example: Modify /usr/local/google/home/tzn/src/oak/oak_restricted_kernel_wrapper/src/asm/boot.s and add an `int3` instruction in `_wrapper_entry`, then run `just run_oak_functions_test`, and see it fail. Then remove the `int3` and rerun the command, and see it pass again within 30s. Bug: 355606262 Change-Id: Idbc4c42c3f926129d55103349b49dfe9f25b6f3c --- justfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/justfile b/justfile index 58415096d8..4ab9d7e0f2 100644 --- a/justfile +++ b/justfile @@ -47,7 +47,7 @@ run_oak_functions_containers_launcher wasm_path port lookup_data_path communicat --communication-channel={{communication_channel}} run_oak_functions_launcher wasm_path port lookup_data_path: - target/x86_64-unknown-linux-gnu/debug/oak_functions_launcher \ + target/x86_64-unknown-linux-gnu/release/oak_functions_launcher \ --bios-binary=stage0_bin/target/x86_64-unknown-none/release/stage0_bin \ --kernel=oak_restricted_kernel_wrapper/target/x86_64-unknown-none/release/oak_restricted_kernel_wrapper_bin \ --vmm-binary=$(which qemu-system-x86_64) \ @@ -58,7 +58,9 @@ run_oak_functions_launcher wasm_path port lookup_data_path: --port={{port}} \ --lookup-data={{lookup_data_path}} \ - +# Run an integration test for Oak Functions making sure all the dependencies are built. +run_oak_functions_test: oak_orchestrator oak_functions_launcher oak_functions_enclave_app (wasm_release_crate "key_value_lookup") oak_restricted_kernel_wrapper + cargo test --package=key_value_lookup test_server # Builds a variant of the restricted kernel and creates a bzImage of it. # Then creates provenance subjects for it.