Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wip: [skip-ci] duplicate clustertest fixes for testing #1383

Open
wants to merge 1 commit into
base: Ie3fb17309c814fc5cf7b2781d102e95f7af5f47a
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 6 additions & 32 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ vmemcached = "0.5.0"
walkdir = "2.5.0"
xxhash-rust = { version = "0.8.10", features = ["xxh3"] }
zipf = "7.0.1"
jobserver = "0.1.32"

[profile.release]
debug=true
Expand Down
4 changes: 4 additions & 0 deletions readyset-clustertest/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ readyset-clustertest-macros = { path = "./macros" }
readyset-tracing = { path = "../readyset-tracing" }
rust_decimal = { workspace = true }

[build-dependencies]
anyhow = { workspace = true }
jobserver = { workspace = true }

[[bench]]
name = "clustering"
harness = false
Expand Down
49 changes: 26 additions & 23 deletions readyset-clustertest/build.rs
Original file line number Diff line number Diff line change
@@ -1,30 +1,33 @@
use anyhow::{anyhow, Result};
use jobserver::Client;
use std::env;
use std::path::Path;

fn main() {
fn main() -> Result<()> {
if env::var("CLIPPY_ARGS").is_ok() {
// running via cargo clippy; don't bother compiling test dependencies
return;
return Ok(());
}
env::set_current_dir(Path::new("..")).expect("failed to change path");
let status = std::process::Command::new("cargo")
.args([
"--locked",
"build",
"--target-dir",
"target/clustertest",
"--release",
"--bin",
"readyset",
"--bin",
"readyset-server",
"--features",
"failure_injection",
])
.status()
.expect("failed to execute cargo");
assert!(
status.success(),
"cargo exited with nonzero status: {status}"
);
env::set_current_dir(Path::new(".."))?;
let client = unsafe { Client::from_env_ext(false).client }?;
let mut cmd = std::process::Command::new("cargo");
cmd.args([
"--locked",
"build",
"--target-dir",
"target/clustertest",
"--release",
"--bin",
"readyset",
"--bin",
"readyset-server",
"--features",
"failure_injection",
]);
client.configure(&mut cmd);
let status = cmd.status()?;
if !status.success() {
return Err(anyhow!("cargo exited with nonzero status: {status}"));
}
Ok(())
}