mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 09:16:00 +00:00
modified test-suite
This commit is contained in:
8
.github/workflows/test-suite.yml
vendored
8
.github/workflows/test-suite.yml
vendored
@@ -402,3 +402,11 @@ jobs:
|
|||||||
run: rustup override set beta
|
run: rustup override set beta
|
||||||
- name: Run make
|
- name: Run make
|
||||||
run: make
|
run: make
|
||||||
|
cli-check:
|
||||||
|
name: cli-check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: cargo-fmt
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: Run Makefile to trigger the bash script
|
||||||
|
run: make cli
|
||||||
|
|||||||
2
Makefile
2
Makefile
@@ -168,7 +168,7 @@ test: test-release
|
|||||||
cli:
|
cli:
|
||||||
./lighthouse/scripts/cli.sh
|
./lighthouse/scripts/cli.sh
|
||||||
# Runs the entire test suite, downloading test vectors if required.
|
# Runs the entire test suite, downloading test vectors if required.
|
||||||
test-full: cargo-fmt test-release test-debug test-ef test-exec-engine cli
|
test-full: cargo-fmt test-release test-debug test-ef test-exec-engine
|
||||||
|
|
||||||
|
|
||||||
# Lints the code for bad style and potentially unsafe arithmetic using Clippy.
|
# Lints the code for bad style and potentially unsafe arithmetic using Clippy.
|
||||||
|
|||||||
@@ -1,44 +1,29 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
|
# Check if a lighthouse binary exists in the current branch.
|
||||||
|
maxperf=./target/maxperf/lighthouse
|
||||||
|
release=./target/release/lighthouse
|
||||||
|
debug=./target/debug/lighthouse
|
||||||
|
|
||||||
#read version
|
if [[ -f "$maxperf" ]]; then
|
||||||
read -p "Enter Lighthouse version: " version
|
CMD="$maxperf"
|
||||||
|
elif [[ -f "$release" ]]; then
|
||||||
|
CMD="$release"
|
||||||
|
elif [[ -f "$debug" ]]; then
|
||||||
|
CMD="$debug"
|
||||||
|
else
|
||||||
|
# No binary exists, build it.
|
||||||
|
cargo build --locked
|
||||||
|
CMD="$debug"
|
||||||
|
fi
|
||||||
|
|
||||||
#download lighthouse binary
|
# Remove the existing help text file if it exists.
|
||||||
binary="curl -LO https://github.com/sigp/lighthouse/releases/download/v$version/lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz"
|
rm -f -- cli.txt
|
||||||
|
|
||||||
#download the binary to the present working directory
|
# Store all help strings in variables.
|
||||||
cd ./lighthouse/scripts
|
bn=$($CMD bn --help)
|
||||||
$binary
|
vc=$($CMD vc --help)
|
||||||
|
wallet=$($CMD a wallet --help)
|
||||||
|
|
||||||
#extract
|
# Print all help strings to the cli.txt file.
|
||||||
tar xvf lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz
|
printf "%s\n\n" "$bn" "$vc" "$wallet" >> cli.txt
|
||||||
|
|
||||||
#remove
|
|
||||||
rm lighthouse-v$version-x86_64-unknown-linux-gnu.tar.gz
|
|
||||||
|
|
||||||
#outputs help text. the "&& echo >> cli.txt is to create a line space between the next output"
|
|
||||||
./lighthouse --help | tee cli.txt && echo >> cli.txt
|
|
||||||
|
|
||||||
# account manager, the -a option means append, i.e., append the output so that all outputs are in a single file
|
|
||||||
./lighthouse a --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
# subcommand under account
|
|
||||||
./lighthouse a validator --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
./lighthouse a validator modify --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
./lighthouse a validator slashing-protection --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
|
|
||||||
./lighthouse a wallet --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
|
|
||||||
# beacon node
|
|
||||||
./lighthouse bn --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
# boot-node
|
|
||||||
./lighthouse boot_node --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
|
|
||||||
# database manager
|
|
||||||
./lighthouse db --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
|
|
||||||
# validator client
|
|
||||||
./lighthouse vc --help | tee -a cli.txt && echo >> cli.txt
|
|
||||||
|
|
||||||
# remove binary file
|
|
||||||
rm lighthouse
|
|
||||||
Reference in New Issue
Block a user