Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ crates/tools/module_roots
crates/tools/pricer

# Rust outputs
crates/stylus/tests/*/target/
crates/stylus/tests/target/
crates/wasm-testsuite/target/
crates/wasm-libraries/target/
crates/tools/wasmer/target/
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ stylus_lang_rust = $(wildcard $(rust_sdk)/*/src/*.rs $(rust_sdk)/*/src/*/*.rs $(
stylus_lang_c = $(wildcard $(c_sdk)/*/*.c $(c_sdk)/*/*.h)
stylus_lang_bf = $(wildcard crates/langs/bf/src/*.* crates/langs/bf/src/*.toml)

get_stylus_test_wasm = $(stylus_test_dir)/$(1)/$(wasm32_unknown)/$(1).wasm
get_stylus_test_wasm = $(stylus_test_dir)/$(wasm32_unknown)/$(1).wasm
get_stylus_test_rust = $(wildcard $(stylus_test_dir)/$(1)/*.toml $(stylus_test_dir)/$(1)/src/*.rs) $(stylus_cargo) $(stylus_lang_rust)
get_stylus_test_c = $(wildcard $(c_sdk)/examples/$(1)/*.c $(c_sdk)/examples/$(1)/*.h) $(stylus_lang_c)
stylus_test_bfs = $(wildcard $(stylus_test_dir)/bf/*.b)
Expand Down Expand Up @@ -293,7 +293,7 @@ clean:
rm -f crates/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang/*.o
rm -f crates/wasm-libraries/soft-float/SoftFloat/build/Wasm-Clang/*.a
rm -f crates/wasm-libraries/forward/*.wat
rm -rf crates/stylus/tests/*/target/ crates/stylus/tests/*/*.wasm
rm -rf crates/stylus/tests/target/ crates/stylus/tests/*/*.wasm
rm -rf brotli/buildfiles
@rm -rf contracts/build contracts/cache solgen/go/
@rm -rf contracts-legacy/build contracts-legacy/cache
Expand Down
2 changes: 2 additions & 0 deletions changelog/pmikolajczyk-nit-4756.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
### Ignored
- Consolidate stylus test crates into a single Cargo workspace
2 changes: 1 addition & 1 deletion crates/stylus/src/test/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ impl TestEvmApi {
}

pub fn deploy(&mut self, address: Bytes20, config: StylusConfig, name: &str) -> Result<()> {
let file = format!("tests/{name}/target/wasm32-unknown-unknown/release/{name}.wasm");
let file = format!("tests/target/wasm32-unknown-unknown/release/{name}.wasm");
let wasm = std::fs::read(file)?;
let module = native::module(&wasm, self.compile.clone(), Target::default(), false)?;
self.contracts.lock().insert(address, module);
Expand Down
8 changes: 4 additions & 4 deletions crates/stylus/src/test/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ fn test_rust() -> Result<()> {
// the input is the # of hashings followed by a preimage
// the output is the iterated hash of the preimage

let filename = "tests/keccak/target/wasm32-unknown-unknown/release/keccak.wasm";
let filename = "tests/target/wasm32-unknown-unknown/release/keccak.wasm";
let preimage = "°º¤ø,¸,ø¤°º¤ø,¸,ø¤°º¤ø,¸ nyan nyan ~=[,,_,,]:3 nyan nyan";
let preimage = preimage.as_bytes().to_vec();
let hash = hex::encode(crypto::keccak(&preimage));
Expand Down Expand Up @@ -347,7 +347,7 @@ fn test_fallible() -> Result<()> {
// an input starting with 0x00 will execute an unreachable
// an empty input induces a panic

let filename = "tests/fallible/target/wasm32-unknown-unknown/release/fallible.wasm";
let filename = "tests/target/wasm32-unknown-unknown/release/fallible.wasm";
let (compile, config, ink) = test_configs();

let mut native = TestInstance::new_linked(filename, &compile, config)?;
Expand Down Expand Up @@ -384,7 +384,7 @@ fn test_storage() -> Result<()> {
// an input starting with 0x00 will induce a storage read
// all other inputs induce a storage write

let filename = "tests/storage/target/wasm32-unknown-unknown/release/storage.wasm";
let filename = "tests/target/wasm32-unknown-unknown/release/storage.wasm";
let (compile, config, ink) = test_configs();

let key = crypto::keccak(filename.as_bytes());
Expand Down Expand Up @@ -476,7 +476,7 @@ fn test_calls() -> Result<()> {
let args = tree[53..].to_vec();
println!("ARGS {}", hex::encode(&args));

let filename = "tests/multicall/target/wasm32-unknown-unknown/release/multicall.wasm";
let filename = "tests/target/wasm32-unknown-unknown/release/multicall.wasm";
let (compile, config, ink) = test_configs();

let (mut native, mut evm) = TestInstance::new_with_evm(filename, &compile, config)?;
Expand Down
2 changes: 1 addition & 1 deletion crates/stylus/src/test/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use crate::test::{TestInstance, random_bytes20, random_bytes32, run_native, test
#[test]
#[ignore = "needs to update erc20 to use new SDK"]
fn test_sdk_routes() -> Result<()> {
let filename = "tests/erc20/target/wasm32-unknown-unknown/release/erc20.wasm";
let filename = "tests/target/wasm32-unknown-unknown/release/erc20.wasm";

macro_rules! hex {
($($hex:expr_2021),+) => {
Expand Down
Loading
Loading