forked from dotnet/vscode-dotnet-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.sh
executable file
·98 lines (90 loc) · 1.69 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
RESULT=0
RED=`tput setaf 1`
GREEN=`tput setaf 2`
NC=`tput sgr0`
if [ "$1" = "--tslint" ];
then
npm run lint
if [ $? -ne 0 ];
then
echo ""
echo "${RED}TSLint Failed.${NC}"
echo ""
RESULT=1
else
echo ""
echo "${GREEN}TSLint Succeeded.${NC}"
echo ""
fi
fi
echo ""
echo "----------- Testing vscode-dotnet-runtime-library -----------"
echo ""
pushd vscode-dotnet-runtime-library
rm -rf node_modules
npm ci
npm run test
if [ $? -ne 0 ];
then
echo ""
echo "${RED}Acquisition Library Tests Failed.${NC}"
echo ""
RESULT=1
else
echo ""
echo "${GREEN}Acquisition Library Tests Succeeded.${NC}"
echo ""
fi
popd
echo ""
echo "----------- Testing vscode-dotnet-runtime-extension -----------"
echo ""
pushd vscode-dotnet-runtime-extension
rm -rf node_modules
npm ci
npm run test
if [ $? -ne 0 ];
then
echo ""
echo "${RED}.NET Runtime Acquisition Extension Tests Failed.${NC}"
echo ""
RESULT=1
else
echo ""
echo "${GREEN}.NET Runtime Acquisition Extension Tests Succeeded.${NC}"
echo ""
fi
popd
echo ""
echo "----------- Testing vscode-dotnet-sdk-extension -----------"
echo ""
pushd vscode-dotnet-sdk-extension
rm -rf node_modules
npm ci
npm run test
if [ $? -ne 0 ];
then
echo ""
echo "${RED}.NET SDK Acquisition Extension Tests Failed.${NC}"
echo ""
RESULT=1
else
echo ""
echo "${GREEN}.NET SDK Acquisition Extension Tests Succeeded.${NC}"
echo ""
fi
popd
if [ $RESULT -ne 0 ];
then
echo ""
echo ""
echo "${RED}Tests Failed.${NC}"
echo ""
exit $RESULT
else
echo ""
echo ""
echo "${GREEN}All Tests Succeeded.${NC}"
echo ""
exit $RESULT
fi