-
Notifications
You must be signed in to change notification settings - Fork 527
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a893b18
commit 2473b25
Showing
10 changed files
with
55 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/bin/bash | ||
|
||
function exists_in_list() { | ||
LIST=$1 | ||
DELIMITER=$2 | ||
VALUE=$3 | ||
echo $LIST | tr "$DELIMITER" '\n' | grep -F -q -x "$VALUE" | ||
} | ||
|
||
input=$1 | ||
|
||
programs="auction-house auctioneer candy-machine fixed-price-sale gumdrop hydra token-entangler" | ||
|
||
mkdir -p test-programs | ||
|
||
if exists_in_list "$programs" " " $input; then | ||
echo "testing $input" | ||
cd $input/program | ||
cargo test-bpf --bpf-out-dir ../../test-programs/ | ||
cd ../../ | ||
|
||
elif [[ $input = "all" ]] | ||
then | ||
echo "testing all programs" | ||
for program in ${programs}; do | ||
echo "testing $program" | ||
cd $program/program | ||
cargo test-bpf --bpf-out-dir ../../test-programs/ | ||
cd ../../ | ||
done | ||
#echo "building testing-utils" | ||
#cd core/rust/testing-utils | ||
#cargo build-bpf --bpf-out-dir ../../../test-programs/ | ||
#cd ../../../ | ||
elif [[ $input = "token-auth-rules" ]] | ||
then | ||
solana program dump -u https://api.mainnet-beta.solana.com auth9SigNpDKz4sJJ1DfCTuZrZNSAgh9sFD3rboVmgg ./test-programs/mpl_token_auth_rules.so | ||
elif [[ $input = "rooster" ]] | ||
then | ||
solana program dump -u https://api.mainnet-beta.solana.com Roostrnex2Z9Y2XZC49sFAdZARP8E4iFpEnZC5QJWdz ./test-programs/rooster.so | ||
else | ||
echo "Invalid program name: $input" | ||
exit 1 | ||
fi | ||
|
||
|