risingwave_regress_test/
lib.rs1#![allow(dead_code)]
16#![allow(clippy::derive_partial_eq_without_eq)]
17#![warn(clippy::dbg_macro)]
18#![warn(clippy::disallowed_methods)]
19#![warn(clippy::doc_markdown)]
20#![warn(clippy::explicit_into_iter_loop)]
21#![warn(clippy::explicit_iter_loop)]
22#![warn(clippy::inconsistent_struct_constructor)]
23#![warn(clippy::unused_async)]
24#![warn(clippy::map_flatten)]
25#![warn(clippy::no_effect_underscore_binding)]
26#![warn(clippy::await_holding_lock)]
27#![deny(rustdoc::broken_intra_doc_links)]
28#![feature(path_file_prefix)]
29#![feature(let_chains)]
30#![feature(register_tool)]
31#![register_tool(rw)]
32#![allow(rw::format_error)]
33
34mod opts;
35
36use clap::Parser;
37pub(crate) use opts::*;
38mod psql;
39pub(crate) use psql::*;
40mod env;
41pub(crate) use env::*;
42mod file;
43pub(crate) use file::*;
44mod schedule;
45pub(crate) use schedule::*;
46use tracing::{error, info};
47
48pub async fn regress_main() -> i32 {
50 let opts = Opts::parse();
51
52 tracing_subscriber::fmt::init();
53
54 match run_schedules(opts).await {
55 Ok(_) => {
56 info!("Risingwave regress test completed successfully!");
57 0
58 }
59 Err(e) => {
60 error!(
61 "Risingwave regress test failed: {:?}. Please ensure that your psql version is larger than 14.1",
62 e
63 );
64 1
65 }
66 }
67}
68
69async fn run_schedules(opts: Opts) -> anyhow::Result<()> {
70 let schedule = Schedule::new(opts)?;
71 schedule.run().await
72}