diff --git a/src/Makefile.am b/src/Makefile.am index 17b66a1bb3..e6220bfe8b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,12 +8,6 @@ include $(srcdir)/src.mk noinst_HEADERS = $(SRC_H_FILES) -if BUILD_TESTS -stellar_core_SOURCES = main/StellarCoreVersion.cpp main/XDRFilesSha256.cpp $(SRC_CXX_FILES) $(SRC_TEST_CXX_FILES) -else # !BUILD_TESTS -stellar_core_SOURCES = main/StellarCoreVersion.cpp main/XDRFilesSha256.cpp $(SRC_CXX_FILES) -endif # !BUILD_TESTS - if USE_TRACY CARGO_FEATURE_TRACY = --features tracy else @@ -187,13 +181,13 @@ $(SOROBAN_LIBS_STAMP): $(wildcard rust/soroban/p*/Cargo.lock) Makefile $(RUST_DE FEATURE_FLAGS="" ; \ case "$$proto" in \ p21) \ - FEATURE_FLAGS="$(CARGO_FEATURE_TESTUTILS)" \ + FEATURE_FLAGS="" \ ;; \ $(SOROBAN_MAX_PROTOCOL)) \ - FEATURE_FLAGS="$(CARGO_FEATURE_TRACY) $(CARGO_FEATURE_NEXT) $(CARGO_FEATURE_TESTUTILS)" \ + FEATURE_FLAGS="$(CARGO_FEATURE_TRACY) $(CARGO_FEATURE_NEXT)" \ ;; \ *) \ - FEATURE_FLAGS="$(CARGO_FEATURE_TRACY) $(CARGO_FEATURE_TESTUTILS)" \ + FEATURE_FLAGS="$(CARGO_FEATURE_TRACY)" \ ;; \ esac ; \ cd $(abspath $(RUST_BUILD_DIR))/soroban/$$proto && \ @@ -226,7 +220,7 @@ $(LIBRUST_STELLAR_CORE): $(RUST_HOST_DEPFILES) $(SRC_RUST_FILES) Makefile $(SORO --$(RUST_PROFILE) \ --locked \ --target-dir $(abspath $(RUST_TARGET_DIR)) \ - $(CARGO_FEATURE_TRACY) $(CARGO_FEATURE_NEXT) \ + $(CARGO_FEATURE_TRACY) $(CARGO_FEATURE_NEXT) $(CARGO_FEATURE_TESTUTILS) \ -- \ $(ALL_SOROBAN_EXTERN_ARGS) \ $(ALL_SOROBAN_DEPEND_ARGS) diff --git a/src/rust/src/lib.rs b/src/rust/src/lib.rs index 0441ed8204..082c16c624 100644 --- a/src/rust/src/lib.rs +++ b/src/rust/src/lib.rs @@ -513,9 +513,9 @@ use log::partition::TX; // We have multiple copies of soroban linked into stellar-core here. This is // accomplished using an adaptor module -- contract.rs -- mounted multiple times -// into the same outer crate, inside different modules soroban_p21, soroban_p22, -// etc. each with its own local binding for the external crate soroban_env_host. -// The contract.rs module imports soroban_env_host from `super` which means each +// into the same outer crate, inside different modules p21, p22, etc. each with +// its own local binding for the external crate soroban_env_host. The +// contract.rs module imports soroban_env_host from `super` which means each // instance of it sees a different soroban. This is a bit of a hack and only // works when the soroban versions all have a compatible _enough_ interface to // all be called from "the same" contract.rs. @@ -774,6 +774,7 @@ mod test_extra_protocol { use super::*; use std::hash::Hasher; + use std::str::FromStr; pub(super) fn maybe_invoke_host_function_again_and_compare_outputs( res1: &Result>, @@ -845,9 +846,7 @@ mod test_extra_protocol { ) -> Result<(), Box> { match new_protocol { 22 => { - use soroban_p22::contract::{ - inplace_modify_cxxbuf_encoded_type, xdr::SorobanResources, - }; + use p22::contract::{inplace_modify_cxxbuf_encoded_type, xdr::SorobanResources}; if let Ok(extra) = std::env::var("SOROBAN_TEST_CPU_BUDGET_FACTOR") { if let Ok(factor) = u32::from_str(&extra) { inplace_modify_cxxbuf_encoded_type::( @@ -884,7 +883,7 @@ mod test_extra_protocol { match new_protocol { 22 => { - use soroban_p22::contract::{ + use p22::contract::{ inplace_modify_cxxbuf_encoded_type, xdr::ContractCostParams, xdr::ContractCostType as CT, };