Init command contains option "--template" which will generate "Both | PoC (legacy tests) | Fuzz" trdelnik tests structure
for BOTH , both folders (as described below) will be generated
for Fuzz - only fuzz_tests will be generated
for PoC - only poc_tests will be generated
Trdelnik-tests structure is as follows:
trdelnik-tests
poc_tests
tests
test.rs
Cargo.toml
fuzz_tests
fuzz_0
Cargo.toml - I find this separate Cargo manifest for each fuzz test useful if we will support ProgramStubs/ProgramTest
test_fuzz.rs
fuzz_1
fuzz_2
described structure works essentially as before:
"trdelnik test" will call PoC Tests
"trdelnik fuzz run fuzz_0" will run fuzz_0 test
"trdelnik fuzz run fuzz_1" will run fuzz_1 test
if fuzz_x does not exists, honggfuzz will throw an error
hfuzz_target is in the root of the project
hfuzz_workspace is in the root of the project (--with-exit-code should work with this location)
added subcommand "trdelnik fuzz add" which will add new fuzz_x target as described in the structure above
currently it does not support custom name , just finds the highest X and generates fuzz_X+1.
some new fuzzer options were added into the Trdelnik.toml manifest
build and init has arch option such as build-bpf or build-sbf
test_generator was renamed to workspace builder
clean command was moved to the workspace_builder
discover Anchor.toml/Cargo.tom/Trdelnik.toml was added into invoked commands
constants were moved to the client/src/lib.rs
PoC tests dependencies were changed to dev-dependencies as these are used for Tests
examples were updated to the new structure
Looks like a lot of changes were made, however there are still plenty of TODO or FIXME that should be resolved. This PR contains only initial logic, that was tested on examples, it should improve the project structure and also readability.
Init command contains option "--template" which will generate "Both | PoC (legacy tests) | Fuzz" trdelnik tests structure
Trdelnik-tests structure is as follows:
described structure works essentially as before:
hfuzz_target is in the root of the project
hfuzz_workspace is in the root of the project (--with-exit-code should work with this location)
added subcommand "trdelnik fuzz add" which will add new fuzz_x target as described in the structure above
some new fuzzer options were added into the Trdelnik.toml manifest
build and init has arch option such as build-bpf or build-sbf
test_generator was renamed to workspace builder
clean command was moved to the workspace_builder
discover Anchor.toml/Cargo.tom/Trdelnik.toml was added into invoked commands
constants were moved to the client/src/lib.rs
PoC tests dependencies were changed to dev-dependencies as these are used for Tests
examples were updated to the new structure
Looks like a lot of changes were made, however there are still plenty of TODO or FIXME that should be resolved. This PR contains only initial logic, that was tested on examples, it should improve the project structure and also readability.