From 065d99ab58927dfb7e92ac034d24f0490a19091d Mon Sep 17 00:00:00 2001 From: Jose Garcia Crosta Date: Mon, 5 Aug 2024 14:50:51 -0300 Subject: [PATCH] Fix two tests --- test-cases/overflow-check/Cargo.toml | 21 ----------------- .../remediated-example/Cargo.toml | 23 ++++++++++++++----- .../vulnerable-example/Cargo.toml | 23 ++++++++++++++----- .../vulnerable-example/Cargo.toml | 4 ++-- 4 files changed, 36 insertions(+), 35 deletions(-) delete mode 100644 test-cases/overflow-check/Cargo.toml diff --git a/test-cases/overflow-check/Cargo.toml b/test-cases/overflow-check/Cargo.toml deleted file mode 100644 index 9db3692a..00000000 --- a/test-cases/overflow-check/Cargo.toml +++ /dev/null @@ -1,21 +0,0 @@ -[workspace] -exclude = [".cargo", "target"] -members = ["overflow-check-*/*"] -resolver = "2" - -[workspace.dependencies] -soroban-sdk = { version = "=21.4.0" } - -[profile.release] -codegen-units = 1 -debug = 0 -debug-assertions = false -lto = true -opt-level = "z" -overflow-checks = true -panic = "abort" -strip = "symbols" - -[profile.release-with-logs] -debug-assertions = true -inherits = "release" diff --git a/test-cases/overflow-check/overflow-check-1/remediated-example/Cargo.toml b/test-cases/overflow-check/overflow-check-1/remediated-example/Cargo.toml index 59e7ade0..85f154b6 100644 --- a/test-cases/overflow-check/overflow-check-1/remediated-example/Cargo.toml +++ b/test-cases/overflow-check/overflow-check-1/remediated-example/Cargo.toml @@ -4,14 +4,25 @@ edition = "2021" name = "overflow-check-remediated-1" version = "0.1.0" -[lib] -crate-type = ["cdylib"] - [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "=21.4.0" } -[dev-dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +[dev_dependencies] +soroban-sdk = { version = "=21.4.0", features = ["testutils"] } [features] testutils = ["soroban-sdk/testutils"] + +[profile.release] +codegen-units = 1 +debug = 0 +debug-assertions = false +lto = true +opt-level = "z" +overflow-checks = true +panic = "abort" +strip = "symbols" + +[profile.release-with-logs] +debug-assertions = true +inherits = "release" diff --git a/test-cases/overflow-check/overflow-check-1/vulnerable-example/Cargo.toml b/test-cases/overflow-check/overflow-check-1/vulnerable-example/Cargo.toml index b2229398..de252273 100644 --- a/test-cases/overflow-check/overflow-check-1/vulnerable-example/Cargo.toml +++ b/test-cases/overflow-check/overflow-check-1/vulnerable-example/Cargo.toml @@ -4,14 +4,25 @@ edition = "2021" name = "overflow-check-vulnerable-1" version = "0.1.0" -[lib] -crate-type = ["cdylib"] - [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "=21.4.0" } -[dev-dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +[dev_dependencies] +soroban-sdk = { version = "=21.4.0", features = ["testutils"] } [features] testutils = ["soroban-sdk/testutils"] + +[profile.release] +codegen-units = 1 +debug = 0 +debug-assertions = false +lto = true +opt-level = "z" +overflow-checks = false +panic = "abort" +strip = "symbols" + +[profile.release-with-logs] +debug-assertions = true +inherits = "release" diff --git a/test-cases/soroban-version/soroban-version-1/vulnerable-example/Cargo.toml b/test-cases/soroban-version/soroban-version-1/vulnerable-example/Cargo.toml index 4e7b3fb9..3cb2e661 100644 --- a/test-cases/soroban-version/soroban-version-1/vulnerable-example/Cargo.toml +++ b/test-cases/soroban-version/soroban-version-1/vulnerable-example/Cargo.toml @@ -7,10 +7,10 @@ version = "0.1.0" crate-type = ["cdylib"] [dependencies] -soroban-sdk = { workspace = true } +soroban-sdk = { version = "=20.0.0" } [dev-dependencies] -soroban-sdk = { workspace = true, features = ["testutils"] } +soroban-sdk = { version = "=20.0.0", features = ["testutils"] } [features] testutils = ["soroban-sdk/testutils"]