mirror of
https://github.com/elicpeter/nyx.git
synced 2026-06-12 19:55:14 +02:00
refactor(dynamic): enhance Ruby harness with framework-specific route replay logic (Sinatra, Rails, Hanami), extend Gemfile staging, and update tests/fixtures
This commit is contained in:
parent
41c7b73575
commit
aaf49acefb
20 changed files with 773 additions and 218 deletions
|
|
@ -354,6 +354,27 @@ pub fn run_spec(spec: &HarnessSpec, opts: &SandboxOptions) -> Result<RunOutcome,
|
|||
return Err(RunError::BuildFailed { stderr, attempts });
|
||||
}
|
||||
}
|
||||
Lang::Ruby => {
|
||||
// bundle install if Gemfile is present.
|
||||
match build_sandbox::prepare_ruby(spec, &harness.workdir) {
|
||||
Ok(_) => {}
|
||||
Err(build_sandbox::BuildError::BuildFailed { stderr, attempts }) => {
|
||||
return Err(RunError::BuildFailed { stderr, attempts });
|
||||
}
|
||||
Err(build_sandbox::BuildError::Io(e)) => {
|
||||
return Err(RunError::BuildFailed {
|
||||
stderr: format!("prepare ruby build cache: {e}"),
|
||||
attempts: 1,
|
||||
});
|
||||
}
|
||||
Err(build_sandbox::BuildError::Unsupported) => {
|
||||
return Err(RunError::BuildFailed {
|
||||
stderr: "ruby build preparation unsupported on this host".to_owned(),
|
||||
attempts: 1,
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
Lang::C => {
|
||||
// Compile the harness binary with `cc -o nyx_harness main.c`.
|
||||
// Pass the sandbox profile so the build chooses `-static` when
|
||||
|
|
@ -397,9 +418,6 @@ pub fn run_spec(spec: &HarnessSpec, opts: &SandboxOptions) -> Result<RunOutcome,
|
|||
Err(_) => {}
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
// No build step for other languages.
|
||||
}
|
||||
}
|
||||
|
||||
trace_record(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue