Skip to content

Commit

Permalink
Run the neotests command directly
Browse files Browse the repository at this point in the history
  • Loading branch information
kyechou committed Jul 23, 2024
1 parent 9fa47b8 commit feab387
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,16 @@ usage() {
Options:
-h, --help Print this message and exit
-v, --verbose Enable verbose test output
EOF
}

parse_args() {
VERBOSE=0

while :; do
case "${1-}" in
-h | --help)
usage
exit
;;
-v | --verbose)
VERBOSE=1
;;
-?*) die "Unknown option: $1\n$(usage)" ;;
*) break ;;
esac
Expand All @@ -46,18 +40,10 @@ main() {
# Parse script arguments
parse_args "$@"

# Prepare test parameters
local ctest_flags=(
--progress
--output-on-failure
)
if [[ $VERBOSE -eq 1 ]]; then
ctest_flags+=(--extra-verbose)
fi

# Run the tests
cd "$BUILD_DIR"
ctest "${ctest_flags[@]}"
sudo "$BUILD_DIR/tests/neotests" \
--test-data-dir "$PROJECT_DIR/tests/networks" \
--durations yes
}

main "$@"
Expand Down

0 comments on commit feab387

Please sign in to comment.