-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·34 lines (30 loc) · 1.03 KB
/
Copy pathtest.sh
File metadata and controls
executable file
·34 lines (30 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# This script provides an interactive menu to choose which test to run.
export RUSTFLAGS="-Awarnings"
RUSTFLAGS="-Awarnings"
CARGO_ARGS="--release -- --nocapture"
CARGO_ARGS_IGNORED="--release -- --nocapture --ignored --test-threads=1"
# PS3 is the prompt message for the 'select' command
PS3="Please select a test to run: "
# 'select' creates a menu from a list of options
select option in "dbtests::init_db" "textscanner::search_dbg" "quit"; do
case $option in
"dbtests::init_db")
echo "🚀 initializing database test..."
RUSTFLAGS="-Awarnings" cargo test dbtests::init_db $CARGO_ARGS_IGNORED
break # Exit the loop after running
;;
"textscanner::search_dbg")
echo "🚀 Running text scanner test..."
RUSTFLAGS="-Awarnings" cargo test textscanner::search_dbg $CARGO_ARGS
break # Exit the loop after running
;;
"quit")
echo "👋 Exiting."
break # Exit the loop
;;
*)
echo "❌ Invalid option $REPLY. Please choose 1, 2, or 3."
;;
esac
done