ohif-viewer/OHIFViewer/bin/testPackages.sh
André Botelho Almeida bf68707ff2 Feature/test suite (#169)
* Adding first run of the test environment

* small tweaks

* Fixing tests suite to ohif-viewer

* Improving documentation and fixing versions

* Removing commented lines
2018-03-27 11:50:40 +02:00

40 lines
969 B
Bash

#!/bin/bash
##################################################
# Runs the packages tests
##################################################
# check execution arguments
while [ "$1" != "" ]; do
PARAM=`echo $1 | awk -F= '{print $1}'`
case $PARAM in
-c | --coverage)
export RUN_COVERAGE=1
;;
-v | --verbose)
export COVERAGE_VERBOSE=1
;;
-s | --spacejam)
export RUN_SPACEJAM=1
;;
*)
esac
shift
done
if [ "$RUN_COVERAGE" == 1 ];
then
# Setting coverage variables
app_folder=$(pwd)
app_folder+="/packages/ascend-adaptive-reporting/"
export COVERAGE_APP_FOLDER=$app_folder
export COVERAGE=1
echo 'Running meteor-coverage'
fi
if [ "$RUN_SPACEJAM" == 1 ];
then
spacejam-mocha ./packages/ascend-adaptive-reporting/
else
meteor test-packages --driver-package='practicalmeteor:mocha' ./packages/ascend-adaptive-reporting/
fi