2019-11-05 20:48:28 +03:00
|
|
|
RESULT=0
|
|
|
|
RED=`tput setaf 1`
|
|
|
|
GREEN=`tput setaf 2`
|
|
|
|
NC=`tput sgr0`
|
|
|
|
|
2024-09-11 07:39:51 +03:00
|
|
|
if [ "$1" = "--eslint" ];
|
2019-12-12 01:51:03 +03:00
|
|
|
then
|
2020-05-11 23:24:54 +03:00
|
|
|
npm run lint
|
|
|
|
if [ $? -ne 0 ];
|
|
|
|
then
|
|
|
|
echo ""
|
2024-09-11 07:39:51 +03:00
|
|
|
echo "${RED}ESLint Failed.${NC}"
|
2020-05-11 23:24:54 +03:00
|
|
|
echo ""
|
|
|
|
RESULT=1
|
|
|
|
else
|
|
|
|
echo ""
|
2024-09-11 07:39:51 +03:00
|
|
|
echo "${GREEN}ESLint Succeeded.${NC}"
|
2020-05-11 23:24:54 +03:00
|
|
|
echo ""
|
|
|
|
fi
|
2019-12-12 01:51:03 +03:00
|
|
|
fi
|
|
|
|
|
2019-11-05 20:48:28 +03:00
|
|
|
echo ""
|
2020-01-25 01:12:14 +03:00
|
|
|
echo "----------- Testing vscode-dotnet-runtime-library -----------"
|
2019-11-05 20:48:28 +03:00
|
|
|
echo ""
|
2020-01-25 01:12:14 +03:00
|
|
|
pushd vscode-dotnet-runtime-library
|
2019-11-05 20:48:28 +03:00
|
|
|
rm -rf node_modules
|
2022-07-16 01:02:26 +03:00
|
|
|
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 ""
|
2020-01-25 01:12:14 +03:00
|
|
|
echo "----------- Testing vscode-dotnet-runtime-extension -----------"
|
2019-11-05 20:48:28 +03:00
|
|
|
echo ""
|
2020-01-25 01:12:14 +03:00
|
|
|
pushd vscode-dotnet-runtime-extension
|
2019-11-05 20:48:28 +03:00
|
|
|
rm -rf node_modules
|
2022-07-16 01:02:26 +03:00
|
|
|
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
|
2022-07-16 01:02:26 +03:00
|
|
|
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
|