Parallelize Cases (#109)

* Parallelize over cases

* Rename the state and driver

* Parallelize execution

* Update the default config of the tool

* Make codebase async

* Fix machete

* Fix tests & clear node directories before startup

* Cleanup the cleanup logic

* Rename geth node
This commit is contained in:
Omar
2025-08-01 14:00:08 +03:00
committed by GitHub
parent 330a773a1c
commit 56c2fe8c0c
30 changed files with 1264 additions and 1534 deletions
+15 -8
View File
@@ -4,11 +4,14 @@ use revive_dt_compiler::{Compiler, SolidityCompiler, revive_resolc::Resolc, solc
use revive_dt_config::Arguments;
use semver::Version;
#[test]
fn contracts_can_be_compiled_with_solc() {
#[tokio::test]
async fn contracts_can_be_compiled_with_solc() {
// Arrange
let args = Arguments::default();
let compiler_path = Solc::get_compiler_executable(&args, Version::new(0, 8, 30)).unwrap();
let compiler_path = Solc::get_compiler_executable(&args, Version::new(0, 8, 30))
.await
.unwrap();
println!("About to assert");
// Act
let output = Compiler::<Solc>::new()
@@ -16,7 +19,8 @@ fn contracts_can_be_compiled_with_solc() {
.unwrap()
.with_source("./tests/assets/array_one_element/main.sol")
.unwrap()
.try_build(compiler_path);
.try_build(compiler_path)
.await;
// Assert
let output = output.expect("Failed to compile");
@@ -42,11 +46,13 @@ fn contracts_can_be_compiled_with_solc() {
assert!(callable_file_contracts.contains_key("Callable"));
}
#[test]
fn contracts_can_be_compiled_with_resolc() {
#[tokio::test]
async fn contracts_can_be_compiled_with_resolc() {
// Arrange
let args = Arguments::default();
let compiler_path = Resolc::get_compiler_executable(&args, Version::new(0, 8, 30)).unwrap();
let compiler_path = Resolc::get_compiler_executable(&args, Version::new(0, 8, 30))
.await
.unwrap();
// Act
let output = Compiler::<Resolc>::new()
@@ -54,7 +60,8 @@ fn contracts_can_be_compiled_with_resolc() {
.unwrap()
.with_source("./tests/assets/array_one_element/main.sol")
.unwrap()
.try_build(compiler_path);
.try_build(compiler_path)
.await;
// Assert
let output = output.expect("Failed to compile");