-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.sh
More file actions
executable file
·35 lines (31 loc) · 773 Bytes
/
Copy pathtest.sh
File metadata and controls
executable file
·35 lines (31 loc) · 773 Bytes
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
35
#!/bin/bash
set -e
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
cd "$SCRIPT_DIR"
print_message() {
local message="$1"
local color="$2"
local color_supported=$(tput colors 2>/dev/null)
if [[ -t 1 && (${color_supported:-0} -ge 8) ]]; then
case "$color" in
green) tput setaf 2 ;;
red) tput setaf 1 ;;
yellow) tput setaf 3 ;;
blue) tput setaf 4 ;;
*) tput sgr0 ;;
esac
echo "$message"
tput sgr0
else
echo "$message" # no color
fi
}
print_message "Running tests on BELLE..." blue
cd belle
cargo test
cd ..
print_message "Running test on BELLE-asm..." blue
cd basm
cargo test
cd ..
print_message "Tests complete!" green