Public release source-69fccd306838
Source commit: 69fccd306838141ba9b1730f4ac4afb1a617bb4e Public tree identity: sha256:8c03637496d3f7ee1b625aa1c823cd69bfcf0247a061d8cb571e05d537329691
This commit is contained in:
parent
f4590ca576
commit
ba749b9e47
88 changed files with 204 additions and 18991 deletions
|
|
@ -704,11 +704,40 @@ fn terminal_record_without_snapshots_clears_active_threads() {
|
|||
|
||||
#[test]
|
||||
fn source_locals_infer_clusterflux_api_values_from_runtime_state() {
|
||||
let mut state = AdapterState::default();
|
||||
let project = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("../../tests/fixtures/runtime-conformance")
|
||||
.canonicalize()
|
||||
let project = std::env::temp_dir().join(format!(
|
||||
"clusterflux-dap-source-locals-{}",
|
||||
std::process::id()
|
||||
));
|
||||
let src = project.join("src");
|
||||
fs::create_dir_all(&src).unwrap();
|
||||
fs::write(
|
||||
src.join("lib.rs"),
|
||||
r#"async fn run_build_workflow() {
|
||||
let source = prepare_source_snapshot();
|
||||
let linux = clusterflux::spawn::async_task_with_arg(source.clone(), compile_linux)
|
||||
.name("compile linux")
|
||||
.env(linux_env())
|
||||
.start()
|
||||
.await
|
||||
.unwrap();
|
||||
let linux_thread = linux.virtual_thread_id();
|
||||
let linux_artifact = linux.join().await.unwrap();
|
||||
let package = clusterflux::spawn::async_task_with_arg(
|
||||
vec![linux_artifact.clone()],
|
||||
package_release,
|
||||
)
|
||||
.name("package artifacts")
|
||||
.env(linux_env())
|
||||
.start()
|
||||
.await
|
||||
.unwrap();
|
||||
let package_artifact = package.join().await.unwrap();
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let mut state = AdapterState::default();
|
||||
state.project = project.to_string_lossy().into_owned();
|
||||
state.source_path = "src/lib.rs".to_owned();
|
||||
let source = fs::read_to_string(project.join(&state.source_path)).unwrap();
|
||||
|
|
@ -744,6 +773,8 @@ fn source_locals_infer_clusterflux_api_values_from_runtime_state() {
|
|||
variable["name"] == "unavailable-local-diagnostic"
|
||||
&& variable["type"] == "unavailable-local"
|
||||
}));
|
||||
|
||||
let _ = fs::remove_dir_all(project);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -863,11 +894,20 @@ fn package_release(inputs: Vec<Artifact>) -> Artifact {
|
|||
|
||||
#[test]
|
||||
fn wasm_frame_locals_expose_only_values_from_the_node_snapshot() {
|
||||
let project = std::env::temp_dir().join(format!(
|
||||
"clusterflux-dap-wasm-locals-{}",
|
||||
std::process::id()
|
||||
));
|
||||
let src = project.join("src");
|
||||
fs::create_dir_all(&src).unwrap();
|
||||
fs::write(
|
||||
src.join("lib.rs"),
|
||||
"pub extern \"C\" fn task_add_one(input: i32) -> i32 {\n input + 1\n}\n",
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let mut state = AdapterState::default();
|
||||
state.project = Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.join("../../tests/fixtures/runtime-conformance")
|
||||
.to_string_lossy()
|
||||
.into_owned();
|
||||
state.project = project.to_string_lossy().into_owned();
|
||||
state.source_path = "src/lib.rs".to_owned();
|
||||
let source = fs::read_to_string(Path::new(&state.project).join(&state.source_path)).unwrap();
|
||||
state.threads.get_mut(&MAIN_THREAD).unwrap().line = source
|
||||
|
|
@ -895,6 +935,8 @@ fn wasm_frame_locals_expose_only_values_from_the_node_snapshot() {
|
|||
assert!(!locals
|
||||
.iter()
|
||||
.any(|variable| variable["name"] == "wasm-local-diagnostic"));
|
||||
|
||||
let _ = fs::remove_dir_all(project);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ impl Default for AdapterState {
|
|||
project,
|
||||
source_path: "src/lib.rs".to_owned(),
|
||||
runtime_backend: RuntimeBackend::Simulated,
|
||||
coordinator_endpoint: "https://clusterflux.michelpaulissen.com".to_owned(),
|
||||
coordinator_endpoint: "https://clusterflux.lesstuff.com".to_owned(),
|
||||
tenant: TenantId::from("tenant"),
|
||||
project_id: ProjectId::from("project"),
|
||||
actor_user: UserId::from("dap"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue