Commit 32fbb020 by Andy Armstrong

Clean up build scripts

 - add a .jshintrc file
 - add a test-js target
 - make test scripts not use coverage by default
parent 94559a0f
This diff is collapsed. Click to expand it.
......@@ -48,3 +48,6 @@ install: install-wheels install-python install-js install-nltk-data install-test
test:
./scripts/test.sh
test-js:
./scripts/test-js.sh
......@@ -11,7 +11,7 @@ module.exports = function(config) {
'karma-coverage',
'karma-jasmine',
'karma-chrome-launcher',
'karma-phantomjs-launcher',
'karma-phantomjs-launcher'
],
// frameworks to use
......@@ -36,7 +36,7 @@ module.exports = function(config) {
{
pattern: 'fixtures/*.html',
served: true, included: false
},
}
],
......
......@@ -3,7 +3,7 @@
cd `dirname $BASH_SOURCE` && cd ..
echo "Generating HTML fixtures for JavaScript tests..."
export DJANGO_SETTINGS_MODULE="settings.test"
export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.test"}
./scripts/render_templates.py openassessment/xblock/static/js/fixtures/templates.json
echo "Running JavaScript tests..."
......
......@@ -6,5 +6,5 @@ cd `dirname $BASH_SOURCE` && cd ..
git clean -xfd "./storage/test/"
echo "Running Python tests..."
export DJANGO_SETTINGS_MODULE="settings.test"
export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.test"}
python manage.py test $1
......@@ -4,6 +4,7 @@
set -e
cd `dirname $BASH_SOURCE` && cd ..
export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.test_with_coverage"}
./scripts/test-python.sh $1
./scripts/test-js.sh
./scripts/build-docs.sh
......@@ -9,7 +9,7 @@ make install-js
make javascript
# Configure Django settings
export DJANGO_SETTINGS_MODULE="settings.dev"
export DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-"settings.dev"}
# Create the database
echo "Updating the database..."
......
......@@ -15,10 +15,6 @@ TEST_APPS = (
# Configure nose
NOSE_ARGS = [
"-a !acceptance",
'--with-coverage',
'--cover-package=' + ",".join(TEST_APPS),
'--cover-branches',
'--cover-erase',
]
DATABASES = {
......
"""
Django settings for running tests with coverage.
"""
# Inherit from the test settings
from .test import * # pylint:disable=W0614,W0401
# Configure nose so that tests are run with coverage
NOSE_ARGS = [
"-a !acceptance",
'--with-coverage',
'--cover-package=' + ",".join(TEST_APPS),
'--cover-branches',
'--cover-erase',
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment