vscode-dotnet-runtime/test.sh

98 строки
1.7 KiB
Bash
Исходник Обычный вид История

2019-11-05 20:48:28 +03:00
RESULT=0
RED=`tput setaf 1`
GREEN=`tput setaf 2`
NC=`tput sgr0`
if [ "$1" = "--eslint" ];
then
2020-05-11 23:24:54 +03:00
npm run lint
if [ $? -ne 0 ];
then
echo ""
echo "${RED}ESLint Failed.${NC}"
2020-05-11 23:24:54 +03:00
echo ""
RESULT=1
else
echo ""
echo "${GREEN}ESLint Succeeded.${NC}"
2020-05-11 23:24:54 +03:00
echo ""
fi
fi
2019-11-05 20:48:28 +03:00
echo ""
echo "----------- Testing vscode-dotnet-runtime-library -----------"
2019-11-05 20:48:28 +03:00
echo ""
pushd vscode-dotnet-runtime-library
2019-11-05 20:48:28 +03:00
rm -rf node_modules
npm ci
2019-11-05 20:48:28 +03:00
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 -----------"
2019-11-05 20:48:28 +03:00
echo ""
pushd vscode-dotnet-runtime-extension
2019-11-05 20:48:28 +03:00
rm -rf node_modules
npm ci
2019-11-05 20:48:28 +03:00
npm run test
if [ $? -ne 0 ];
then
echo ""
2021-02-09 20:37:28 +03:00
echo "${RED}.NET Runtime Acquisition Extension Tests Failed.${NC}"
2019-11-05 20:48:28 +03:00
echo ""
RESULT=1
else
echo ""
2021-02-09 20:37:28 +03:00
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
2021-02-09 20:37:28 +03:00
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}"
2019-11-05 20:48:28 +03:00
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