]>
git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/run-frontend-unittests.sh
38c47f8e4d779228bdbfb3618b16200f59674baf
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
/node-env
/bin
/activate
14 npm run build
-- --prod --progress=false || failed
=true
17 config
='src/unit-test-configuration.ts'
18 if [ -e $config ]; then
19 mv $config ${config}_old
21 cp ${config}.sample
$config
23 npm run
test:ci || failed
=true
26 if [ -e ${config}_old
]; then
27 mv ${config}_old
$config
34 echo -e "\nTry running 'npm run fix' to fix some linting errors. \
35 Some errors might need a manual fix."
40 i18n_lint
=`awk '/<source> |<source>$| <\/source>/,/<\/context-group>/ {printf "%-4s ", NR; print}' src/locale/messages.xlf`
41 if [ "$i18n_lint" ]; then
42 echo -e "The following source translations in 'messages.xlf' need to be \
43 fixed, please check the I18N suggestions in 'HACKING.rst':\n"
50 resolutions
=`git status | grep package-lock.json`
51 if [ "$resolutions" ]; then
52 echo "Please run 'npm run fix:audit' before committing."
56 if [ `uname` != "FreeBSD" ]; then
60 if [ "$failed" = "true" ]; then