From 730c5e39f76022c5715d7eb65d5536fad1c54710 Mon Sep 17 00:00:00 2001 From: Rachel Bousfield Date: Tue, 3 Oct 2023 00:23:33 -0600 Subject: [PATCH] remove C test --- Makefile | 7 +---- arbitrator/stylus/src/test/native.rs | 42 ---------------------------- 2 files changed, 1 insertion(+), 48 deletions(-) diff --git a/Makefile b/Makefile index 7c80247af..f8605e3c1 100644 --- a/Makefile +++ b/Makefile @@ -128,10 +128,8 @@ stylus_test_erc20_wasm = $(call get_stylus_test_wasm,erc20) stylus_test_erc20_src = $(call get_stylus_test_rust,erc20) stylus_test_read-return-data_wasm = $(call get_stylus_test_wasm,read-return-data) stylus_test_read-return-data_src = $(call get_stylus_test_rust,read-return-data) -stylus_test_siphash_wasm = $(c_sdk)/examples/siphash/siphash.wasm -stylus_test_siphash_src = $(call get_stylus_test_c,siphash) -stylus_test_wasms = $(stylus_test_keccak_wasm) $(stylus_test_keccak-100_wasm) $(stylus_test_fallible_wasm) $(stylus_test_storage_wasm) $(stylus_test_siphash_wasm) $(stylus_test_multicall_wasm) $(stylus_test_log_wasm) $(stylus_test_create_wasm) $(stylus_test_sdk-storage_wasm) $(stylus_test_erc20_wasm) $(stylus_test_read-return-data_wasm) $(stylus_test_evm-data_wasm) $(stylus_test_bfs:.b=.wasm) +stylus_test_wasms = $(stylus_test_keccak_wasm) $(stylus_test_keccak-100_wasm) $(stylus_test_fallible_wasm) $(stylus_test_storage_wasm) $(stylus_test_multicall_wasm) $(stylus_test_log_wasm) $(stylus_test_create_wasm) $(stylus_test_sdk-storage_wasm) $(stylus_test_erc20_wasm) $(stylus_test_read-return-data_wasm) $(stylus_test_evm-data_wasm) $(stylus_test_bfs:.b=.wasm) stylus_benchmarks = $(wildcard $(stylus_dir)/*.toml $(stylus_dir)/src/*.rs) $(stylus_test_wasms) stylus_files = $(wildcard $(stylus_dir)/*.toml $(stylus_dir)/src/*.rs) $(rust_prover_files) @@ -409,9 +407,6 @@ $(stylus_test_erc20_wasm): $(stylus_test_erc20_src) $(cargo_nightly) --manifest-path $< --release --config $(stylus_cargo) @touch -c $@ # cargo might decide to not rebuild the binary -$(stylus_test_siphash_wasm): $(stylus_test_siphash_src) - cd $(c_sdk)/examples/siphash/ && make - contracts/test/prover/proofs/float%.json: $(arbitrator_cases)/float%.wasm $(prover_bin) $(output_latest)/soft-float.wasm $(prover_bin) $< -l $(output_latest)/soft-float.wasm -o $@ -b --allow-hostapi --require-success --always-merkleize diff --git a/arbitrator/stylus/src/test/native.rs b/arbitrator/stylus/src/test/native.rs index 73fa94ecb..d74e1b802 100644 --- a/arbitrator/stylus/src/test/native.rs +++ b/arbitrator/stylus/src/test/native.rs @@ -310,48 +310,6 @@ fn test_rust() -> Result<()> { check_instrumentation(native, machine) } -#[test] -fn test_c() -> Result<()> { - // in siphash.c - // the inputs are a hash, key, and plaintext - // the output is whether the hash was valid - - let filename = "../langs/c/examples/siphash/siphash.wasm"; - let (compile, config, ink) = test_configs(); - - let text: Vec = (0..63).collect(); - let key: Vec = (0..16).collect(); - let key: [u8; 16] = key.try_into().unwrap(); - let hash = crypto::siphash(&text, &key); - - let mut args = key.to_vec(); - args.extend(text); - - let mut native = TestInstance::new_linked(filename, &compile, config)?; - let output = run_native(&mut native, &args, ink)?; - assert_eq!(output, hash.to_le_bytes()); - - let mut machine = Machine::from_user_path(Path::new(filename), &compile)?; - let output = run_machine(&mut machine, &args, config, ink)?; - assert_eq!(output, hash.to_le_bytes()); - - check_instrumentation(native, machine) -} - -#[test] -fn test_bf() -> Result<()> { - // in cat.b - // the output is the input - - let (compile, config, ink) = test_configs(); - let args = "Hello world!".as_bytes(); - - let mut native = TestInstance::new_linked("tests/bf/cat.wasm", &compile, config)?; - let output = run_native(&mut native, args, ink)?; - assert_eq!(output, args); - Ok(()) -} - #[test] fn test_fallible() -> Result<()> { // in fallible.rs