-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·33 lines (25 loc) · 954 Bytes
/
test.sh
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
#!/usr/bin/env bash
RESET="\033[0m"
RED="\033[0;31m"
print_install_instruction() {
echo -e "${RED} Please refer to https://github.com/dotnet/cli#add-debian-feed to install the latest dotnet \n\n ${RESET}"
}
test() {
echo -e "==========================================================="
echo -e "Test ...... "
echo -e "===========================================================\n"
dotnet test WilsonUnix.sln --filter "category!=nonosxtests&category!=nonlinuxtests"
echo -e "\n"
}
echo -e "==========================================================="
echo -e "Check the installation and the version of dotnet ...... "
echo -e "===========================================================\n"
if ! type "dotnet" > /dev/null 2>&1; then
echo -e "${RED}Error: dotnet is not installed\n ${RESET}"
print_install_instruction
else
VERSION="$(dotnet --version)"
echo -e " dotnet version ${VERSION} is found.\n"
test
fi
echo -e "done."