feat: release Dever 0.1.5 with direct workers and long transactions
This commit is contained in:
1 parent
89629c2197
commit
a900d7e8db
153 files changed
+3676
-3708
No files matched your search
@@ -38,42 +38,31 @@ mod native_objects;
|
||||
mod targets;
|
||||
|
||||
#[test]
|
||||
fn sandbox_bootstrap_requires_static_elf_and_complete_guard_libraries() {
|
||||
let loader = format!("lib/{}", dever_sandbox::loader_name());
|
||||
fn process_runtime_requires_complete_loader_libraries_and_rejects_helpers() {
|
||||
let loader = dever_process::loader_name();
|
||||
let mut files = vec![
|
||||
("bin/bwrap".into(), native_elf::static_executable()),
|
||||
(
|
||||
"bin/guard".into(),
|
||||
native_elf::elf(None, &["libc.so.6"], None),
|
||||
),
|
||||
(
|
||||
loader,
|
||||
native_elf::library(dever_sandbox::loader_name(), &[]),
|
||||
format!("lib/{loader}"),
|
||||
native_elf::library(loader, &["libc.so.6"]),
|
||||
),
|
||||
(
|
||||
"lib/libc.so.6".into(),
|
||||
native_elf::library("libc.so.6", &[]),
|
||||
),
|
||||
];
|
||||
dever_sandbox::validate_assets(&files).unwrap();
|
||||
files[0].1 = native_elf::elf(None, &[], None);
|
||||
dever_process::validate_assets(&files).unwrap();
|
||||
files.push(("bin/bwrap".into(), native_elf::static_executable()));
|
||||
assert!(
|
||||
dever_sandbox::validate_assets(&files)
|
||||
dever_process::validate_assets(&files)
|
||||
.unwrap_err()
|
||||
.contains("static target ELF")
|
||||
.contains("invalid")
|
||||
);
|
||||
files[0].1 = native_elf::library("bwrap", &["libc.so.6"]);
|
||||
assert!(
|
||||
dever_sandbox::validate_assets(&files)
|
||||
.unwrap_err()
|
||||
.contains("static target ELF")
|
||||
);
|
||||
files[0].1 = native_elf::static_executable();
|
||||
files.pop();
|
||||
files.pop();
|
||||
assert!(
|
||||
dever_sandbox::validate_assets(&files)
|
||||
dever_process::validate_assets(&files)
|
||||
.unwrap_err()
|
||||
.contains("sandbox dependency 'lib/libc.so.6' is missing")
|
||||
.contains("lib/libc.so.6")
|
||||
);
|
||||
}
|
||||
|
||||
@@ -354,6 +343,38 @@ fn compiler_libraries_must_form_a_closed_target_and_search_path() {
|
||||
assert!(author.reject().contains("inherited RPATH"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn compiler_libraries_follow_the_linked_soname_not_a_distribution_alias() {
|
||||
let mut author = Author::new();
|
||||
let name = "libLLVM-18.so.18.1";
|
||||
fs::write(
|
||||
author.root.join("inputs/core"),
|
||||
native_elf::compiler(&[name, "libc.so.6"]),
|
||||
)
|
||||
.unwrap();
|
||||
fs::write(
|
||||
author.root.join("inputs/llvm"),
|
||||
native_elf::library(name, &["libc.so.6"]),
|
||||
)
|
||||
.unwrap();
|
||||
author.settings["core"]["sha256"] =
|
||||
json!(sha256_file(&author.root.join("inputs/core")).unwrap());
|
||||
author.settings["core_libraries"][0]["path"] = json!(name);
|
||||
author.settings["core_libraries"][0]["sha256"] =
|
||||
json!(sha256_file(&author.root.join("inputs/llvm")).unwrap());
|
||||
author.save();
|
||||
let output = author.output("linked-soname");
|
||||
let manifest = packaging::create(&author.root, &output).unwrap();
|
||||
assert!(
|
||||
manifest
|
||||
.artifacts
|
||||
.iter()
|
||||
.any(|artifact| artifact.path == format!("lib/{name}"))
|
||||
);
|
||||
assert!(!output.join("lib/libLLVM.so.18.1").exists());
|
||||
assert_signed(&author, &output);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn installation_rechecks_the_signed_native_compiler_closure_before_health_execution() {
|
||||
let author = Author::new();
|
||||
|
||||
Reference in new issue
Block a user