Skip to content

Commit

Permalink
test basic_pub_sub
Browse files Browse the repository at this point in the history
  • Loading branch information
gftea committed Jul 22, 2024
1 parent 5be6b53 commit 583ee33
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions examples/run_examples.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
#!/bin/bash
# set -x

excludes=("longlive_basic_consumer")
export RUSTFLAGS="$RUSTFLAGS -A dead_code -A unused_variables"
# excludes=("longlive_basic_consumer")
# export RUSTFLAGS="$RUSTFLAGS -A dead_code -A unused_variables"

function is_excluded () {
name=$1
for x in ${excludes[@]}; do
if [[ "$x" = "$name" ]];then
return 1
fi
done
return 0
}
# function is_excluded () {
# name=$1
# for x in ${excludes[@]}; do
# if [[ "$x" = "$name" ]];then
# return 1
# fi
# done
# return 0
# }

all_examples=$(cargo run --release --example 2>&1 | grep -E '^ ')
# all_examples=$(cargo run --release --example 2>&1 | grep -E '^ ')

for example in ${all_examples[@]}; do
is_excluded $example
res=$?
if [[ $res = 0 ]];then
cargo run --release --example $example --all-features
fi
done
# for example in ${all_examples[@]}; do
# is_excluded $example
# res=$?
# if [[ $res = 0 ]];then
# cargo run --release --example $example --all-features
# fi
# done

RUST_LOG=trace cargo run --release --example basic_pub_sub --all-features

0 comments on commit 583ee33

Please sign in to comment.