]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/run-frontend-unittests.sh
4 SCRIPTPATH
="$( cd "$
(dirname "$0")" ; pwd -P )"
5 : ${CEPH_ROOT:=$SCRIPTPATH/../../../../}
7 cd $CEPH_ROOT/src
/pybind
/mgr
/dashboard
/frontend
8 [ -z "$BUILD_DIR" ] && BUILD_DIR
=build
9 if [ `uname` != "FreeBSD" ]; then
10 .
$CEPH_ROOT/${BUILD_DIR}/src
/pybind
/mgr
/dashboard
/frontend
/node-env
/bin
/activate
14 npm run build
-- --configuration=production
--progress=false || failed
=true
17 npm run
test:ci || failed
=true
23 echo -e "\nTry running 'npm run fix' to fix some linting errors. \
24 Some errors might need a manual fix."
31 echo -e "\nTranslations extraction has failed."
33 i18n_lint
=`awk '/<source> |<source>$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf`
35 # Excluding the node_modules/ folder errors from the lint error
36 if [[ -n "$i18n_lint" && $i18n_lint != *"node_modules/"* ]]; then
37 echo -e "\nThe following source translations in 'messages.xlf' need to be \
38 fixed, please check the I18N suggestions on https://docs.ceph.com/en/latest/dev/developer_guide/dash-devel/#i18n:\n"
44 if [ `uname` != "FreeBSD" ]; then
48 if [ "$failed" = "true" ]; then