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
@@ -6,8 +6,8 @@ mod llvm_module;
|
||||
#[path = "dever-tests/tests/support/process.rs"]
|
||||
mod process;
|
||||
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
|
||||
#[path = "dever-tests/tests/support/sandbox.rs"]
|
||||
mod sandbox;
|
||||
#[path = "dever-tests/tests/support/process_runtime.rs"]
|
||||
mod process_runtime;
|
||||
#[cfg(all(target_os = "linux", target_arch = "x86_64"))]
|
||||
#[path = "dever-tests/tests/support/temp.rs"]
|
||||
mod temp;
|
||||
@@ -61,10 +61,10 @@ capture() (text: Text) { text = message(result(read())) }
|
||||
checked(ecosystem, READ_APP, READ_PORT, READ_API)
|
||||
}
|
||||
|
||||
fn settings(program: &Program, mode: &str) -> String {
|
||||
fn settings(program: &Program, mode: &str, root: &Path) -> String {
|
||||
let contracts = program.external_worker_contracts();
|
||||
let identity = contracts[0].errors.keys().next().unwrap();
|
||||
json!({"adapter":{"notification.delivery":{"setting":{"mode":mode,"identity":identity,"marker":"/data/lifecycle/worker"},"files":{"lifecycle":{"path":"lifecycle","write":true}}}}})
|
||||
json!({"adapter":{"notification.delivery":{"setting":{"mode":mode,"identity":identity,"marker":root.join("lifecycle/worker")}}}})
|
||||
.to_string()
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ capture() (text: Text) { text = message(result(read())) }
|
||||
"arguments":[], "working_directory":"workers/fixture"
|
||||
});
|
||||
let mut resources =
|
||||
super::sandbox::assets(&Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."))
|
||||
super::process_runtime::assets(&Path::new(env!("CARGO_MANIFEST_DIR")).join("../.."))
|
||||
.into_iter()
|
||||
.map(|asset| resource(asset.path, asset.bytes, asset.executable))
|
||||
.collect::<Vec<_>>();
|
||||
@@ -130,7 +130,7 @@ capture() (text: Text) { text = message(result(read())) }
|
||||
) -> std::process::Output {
|
||||
let (_, program) = source;
|
||||
let directory = temp::TemporaryDirectory::new();
|
||||
stage(&directory, &settings(program, mode));
|
||||
stage(&directory, &settings(program, mode, directory.path()));
|
||||
let resources = resources(program);
|
||||
let output = execute(
|
||||
source,
|
||||
@@ -232,12 +232,12 @@ read() (summary: Summary) {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "requires fresh runtime-external archive, command-fixture and sandbox assets"]
|
||||
#[ignore = "requires fresh runtime-external archive, command-fixture and process_runtime assets"]
|
||||
fn command_binary_io_and_exit_status_use_real_typed_llvm_calls() {
|
||||
let source = command_source();
|
||||
let contract = &source.1.external_command_contracts()[0];
|
||||
let workspace = Path::new(env!("CARGO_MANIFEST_DIR")).join("../..");
|
||||
let mut resources = super::sandbox::assets(&workspace)
|
||||
let mut resources = super::process_runtime::assets(&workspace)
|
||||
.into_iter()
|
||||
.map(|asset| resource(asset.path, asset.bytes, asset.executable))
|
||||
.collect::<Vec<_>>();
|
||||
@@ -590,7 +590,10 @@ read() (value: Int) {
|
||||
let relocated = directory.path().join("program");
|
||||
fs::copy(executable, &relocated).unwrap();
|
||||
drop(build);
|
||||
stage(&directory, &settings(&program, "embedded"));
|
||||
stage(
|
||||
&directory,
|
||||
&settings(&program, "embedded", directory.path()),
|
||||
);
|
||||
result(
|
||||
&llvm_module::execute_program(
|
||||
&relocated,
|
||||
|
||||
Reference in new issue
Block a user