Skip to content

Commit

Permalink
Add workspaces to all test-cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jgcrosta committed Apr 16, 2024
1 parent 7a18c96 commit cf45e04
Show file tree
Hide file tree
Showing 72 changed files with 499 additions and 947 deletions.
21 changes: 21 additions & 0 deletions test-cases/assert-violation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[workspace]
exclude = [".cargo", "target"]
members = ["assert-violation-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "20.5.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"
Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
[package]
edition = "2021"
name = "assert-violation-remediated-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = "=20.0.0"
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true

Original file line number Diff line number Diff line change
@@ -1,31 +1,16 @@
[package]
edition = "2021"
name = "assert-violation-vulnerable-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = "=20.0.0"
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true

21 changes: 21 additions & 0 deletions test-cases/avoid-core-mem-forget/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[workspace]
exclude = [".cargo", "target"]
members = ["avoid-core-mem-forget-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "20.5.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"
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
[package]
name = "avoid-core-mem-forget-1-remediated"
version = "0.1.0"
edition = "2021"
name = "avoid-core-mem-forget-remediated-1"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
[package]
name = "avoid-core-mem-forget-1-vulnerable"
version = "0.1.0"
edition = "2021"
name = "avoid-core-mem-forget-vulnerable-1"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true
21 changes: 21 additions & 0 deletions test-cases/avoid-panic-error/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[workspace]
exclude = [".cargo", "target"]
members = ["avoid-panic-error-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "20.5.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"
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
[package]
edition = "2021"
name = "avoid-panic-error-remediated-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
[package]
edition = "2021"
name = "avoid-panic-error-vulnerable-1"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true
21 changes: 21 additions & 0 deletions test-cases/avoid-unsafe-block/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[workspace]
exclude = [".cargo", "target"]
members = ["avoid-unsafe-block-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "20.5.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"
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
[package]
name = "avoid-unsafe-block-1-remediated"
version = "0.1.0"
edition = "2021"
name = "avoid-unsafe-block-remediated-1"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true
Original file line number Diff line number Diff line change
@@ -1,30 +1,16 @@
[package]
name = "avoid-unsafe-block-1-vulnerable"
version = "0.1.0"
edition = "2021"
name = "avoid-unsafe-block-vulnerable-1"
version = "0.1.0"

[lib]
crate-type = ["cdylib"]

[dependencies]
soroban-sdk = { version = "=20.0.0" }
soroban-sdk = { workspace = true }

[dev_dependencies]
soroban-sdk = { version = "=20.0.0", features = ["testutils"] }
soroban-sdk = { workspace = true, features = ["testutils"] }

[features]
testutils = ["soroban-sdk/testutils"]

[profile.release]
opt-level = "z"
overflow-checks = true
debug = 0
strip = "symbols"
debug-assertions = false
panic = "abort"
codegen-units = 1
lto = true

[profile.release-with-logs]
inherits = "release"
debug-assertions = true
21 changes: 21 additions & 0 deletions test-cases/divide-before-multiply/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[workspace]
exclude = [".cargo", "target"]
members = ["divide-before-multiply-*/*"]
resolver = "2"

[workspace.dependencies]
soroban-sdk = { version = "20.5.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"
Loading

0 comments on commit cf45e04

Please sign in to comment.