Skip to content

Commit

Permalink
Delint existing shell scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Grimes committed May 28, 2018
1 parent 1fca018 commit 3ba4d8e
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 22 deletions.
3 changes: 2 additions & 1 deletion ci/coverage.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash -e

cd $(dirname $0)/..
cd "$(dirname "$0")/.."

if [[ -r ~/.cargo/env ]]; then
# Pick up local install of kcov/cargo-kcov
# shellcheck disable=SC1090
source ~/.cargo/env
fi

Expand Down
2 changes: 1 addition & 1 deletion ci/publish.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

cd $(dirname $0)/..
cd "$(dirname "$0")/.."

if [[ -z "$BUILDKITE_TAG" ]]; then
# Skip publish if this is not a tagged release
Expand Down
10 changes: 4 additions & 6 deletions ci/test-cuda.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
#!/bin/bash -e

cd $(dirname $0)/..
cd "$(dirname "$0")/.."

if [[ -z "$libcuda_verify_ed25519_URL" ]]; then
echo libcuda_verify_ed25519_URL undefined
exit 1
fi
: "${libcuda_verify_ed25519_URL:?environment variable undefined}"

export LD_LIBRARY_PATH=/usr/local/cuda/lib64
export PATH=$PATH:/usr/local/cuda/bin
curl -X GET -o libcuda_verify_ed25519.a "$libcuda_verify_ed25519_URL"

source $HOME/.cargo/env
# shellcheck disable=SC1090 # <-- shellcheck can't follow ~
source ~/.cargo/env
cargo test --features=cuda

exit 0
2 changes: 1 addition & 1 deletion ci/test-ignored.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

cd $(dirname $0)/..
cd "$(dirname "$0")/.."

rustc --version
cargo --version
Expand Down
2 changes: 1 addition & 1 deletion ci/test-nightly.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

cd $(dirname $0)/..
cd "$(dirname "$0")/.."

rustc --version
cargo --version
Expand Down
2 changes: 1 addition & 1 deletion ci/test-stable.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash -e

cd $(dirname $0)/..
cd "$(dirname "$0")/.."

rustc --version
cargo --version
Expand Down
19 changes: 15 additions & 4 deletions multinode-demo/client.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
#!/bin/bash
#!/bin/bash -e

if [[ -z "$1" ]]; then
echo "usage: $0 [leader machine]"
exit 1
fi

LEADER="$1"

set -x
export RUST_LOG=solana=info
rsync -v -e ssh $1:~/solana/leader.json .
rsync -v -e ssh $1:~/solana/mint-demo.json .
cat mint-demo.json | cargo run --release --bin solana-client-demo -- -l leader.json -c 8100 -n 1
rsync -v -e ssh "$LEADER:~/solana/leader.json" .
rsync -v -e ssh "$LEADER:~/solana/mint-demo.json" .

cargo run --release --bin solana-client-demo -- \
-l leader.json -c 8100 -n 1 < mint-demo.json
29 changes: 22 additions & 7 deletions multinode-demo/validator.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
#!/bin/bash
rsync -v -e ssh $1:~/solana/mint-demo.json .
rsync -v -e ssh $1:~/solana/leader.json .
rsync -v -e ssh $1:~/solana/genesis.log .
rsync -v -e ssh $1:~/solana/leader.log .
rsync -v -e ssh $1:~/solana/libcuda_verify_ed25519.a .
#!/bin/bash -e

if [[ -z "$1" ]]; then
echo "usage: $0 [leader machine]"
exit 1
fi

LEADER="$1"

set -x

rsync -v -e ssh "$LEADER:~/solana/mint-demo.json" .
rsync -v -e ssh "$LEADER:~/solana/leader.json" .
rsync -v -e ssh "$LEADER:~/solana/genesis.log" .
rsync -v -e ssh "$LEADER:~/solana/leader.log" .
rsync -v -e ssh "$LEADER:~/solana/libcuda_verify_ed25519.a" .

export RUST_LOG=solana=info

sudo sysctl -w net.core.rmem_max=26214400
cat genesis.log leader.log | cargo run --release --features cuda --bin solana-fullnode -- -l validator.json -s validator.json -v leader.json -b 9000 -d 2>&1 | tee validator-tee.log

cat genesis.log leader.log | \
cargo run --release --features cuda --bin solana-fullnode -- \
-l validator.json -s validator.json -v leader.json -b 9000 -d 2>&1 | tee validator-tee.log

0 comments on commit 3ba4d8e

Please sign in to comment.