Skip to content

Commit

Permalink
Added script changes to run tests dynamically
Browse files Browse the repository at this point in the history
Signed-off-by: Jonsy13 <[email protected]>
  • Loading branch information
Jonsy13 committed Mar 12, 2024
1 parent 7421432 commit 2c0fe43
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions chaoscenter/fuzz_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
# limitations under the License.
#
################################################################################
export GO_MOD_PATHS_MAPPING=( "chaoscenter/graphql/server" "chaoscenter/authentication" "chaoscenter/subscriber" )

export rootDir=$(pwd)
export GO_MOD_PATHS_MAPPING=( "graphql/server" "authentication" "subscriber" )

for dir in "${GO_MOD_PATHS_MAPPING[@]}"; do
cd ${dir} && go mod download && go install github.com/AdamKorcz/go-118-fuzz-build@latest && go get github.com/AdamKorcz/go-118-fuzz-build/testing && cd ${rootDir}
cd ${SRC}/litmus/chaoscenter/${dir} && go mod download && go install github.com/AdamKorcz/go-118-fuzz-build@latest && go get github.com/AdamKorcz/go-118-fuzz-build/testing && cd ${SRC}/litmus/chaoscenter/
fuzz_files=($(find "$(pwd)/${dir}" -type f -name '*_fuzz_test.go'))
for file in "${fuzz_files[@]}"; do
pkg=$(grep -m 1 '^package' "$file" | awk '{print $2}')
Expand Down

0 comments on commit 2c0fe43

Please sign in to comment.