Commit Graph

58 Commits

Author SHA1 Message Date
Calen Pennington
5489a3b645 Merge pull request #44 from edx/feature/cale/run-all-tests
Run all tests on jenkins
2013-06-06 09:52:27 -07:00
Will Daly
359e61d0f2 Fixed issue with xargs on Mac OS X.
Removed cleaning of reports folders, since this was
interferring with coverage reports generated
sequentially by rake test.
2013-06-05 17:06:41 -04:00
Will Daly
ee0115971b Merge pull request #68 from edx/will/diff-cover-integration
Will/diff cover integration
2013-06-05 12:00:16 -07:00
Calen Pennington
0bf7c71ec2 Run all tests on jenkins
We used to specify specific rake test tasks so that we could run all of
them even if early ones failed. However, that meant that as new tasks
were added, they weren't being run on jenkins.

Now, there is a facility in the rake scripts so that tests can run using
the test_sh function, which will delay failure until the end of the rake
run, unless the TESTS_FAIL_FAST environment variable is set.

Furthermore, this reorganizes the jasmine test tasks so that we can run
those as part of `rake test` as well.
2013-06-05 13:08:54 -04:00
Calen Pennington
fdf213f9b5 Compile all of the coffee and sass in the project, not just the files in */static 2013-06-05 13:08:53 -04:00
Will Daly
e1d3fb7301 Added warning message when no coverage information found.
Added comments to tests.rake
2013-06-04 19:21:24 -04:00
Will Daly
99c185f06b Added diff coverage printout to rake coverage command 2013-06-04 18:39:49 -04:00
Will Daly
a5fc721922 Merge branch 'master' into will/diff-cover-integration 2013-06-04 18:19:07 -04:00
Will Daly
9c506020d9 Fixed bug in tests.rake in which rm would be called with no args. 2013-06-04 17:51:12 -04:00
Calen Pennington
6b68f2c0fe Use coffee watch command to watch whole directories, so that it will pick up new coffee files as they are created 2013-06-04 12:52:56 -04:00
Will Daly
afa6f485fd Added diff-cover as a requirement (installed from github) 2013-06-03 13:31:07 -04:00
Nate Hardison
03a9765b79 Change task.invoke to Rake::Task.invoke
Using `task()` reopens the definition of the task, and all we really
need to do is get a reference to the task itself to invoke it.
2013-06-03 10:00:50 -07:00
Nate Hardison
1fd1f63075 Wrapper tasks for :assets-dependent Jasmine tasks
The :browse_jasmine_<system> and :phantomjs_jasmine_<system> tasks
depend on the :assets task, which needs to receive both :system and
:env arguments. Therefore, new tasks (:browse_jasmine and
:phantomjs_jasmine) are created that do take :system and :env args.
The old :browse_jasmine_<system> and :phantomjs_jasmine_<system>
tasks now wrap the new tasks, passing in <system> as an argument
and 'jasmine' (for :env, since it's hardcoded to 'jasmine' in
django_for_jasmine()).
2013-06-03 09:58:01 -07:00
Nate Hardison
35fb5fa47e Add wrapper task to start LMS/CMS server
The LMS/CMS server startup depends on the :assets task, which needs
to receive :system and :env arguments. Since the existing server
startup tasks didn't take a :system argument, a new command called
:runserver is created that does take :system, :env, and :options
arguments. The old server startup tasks are adjusted to wrap the one
:runserver task that does all of the heavy lifting.
2013-06-03 09:58:01 -07:00
Nate Hardison
1001b315a3 Preprocess assets as Django management command
Rather than directly invoke command-line Python (and Mako) from the
assets Rakefile, or call an external Python script, use a Django
management command to preprocess all asset template files.

An "asset template file" is defined as a static asset file with a
file extension indicating that it needs to be run through a template
engine prior to Sass/CoffeeScript compilation or packaging with other
assets. The preprocess_assets management command will look through
all of the files listed in the `STATICFILES_DIRS`, preprocessing each
as needed. Preprocessing strips off the special template file
extension, creating a new file in the process.

Currently, the only variable accessible in an asset template file is
the `THEME_NAME`, defined in the settings.
2013-06-03 09:58:01 -07:00
Will Daly
76ae980006 Clean the report directories before each test run,
to ensure we don't get coverage results from a
previous test run.
2013-06-03 12:19:13 -04:00
Will Daly
34d1ea9e63 Consolidated coverage report generation into one rake command.
Added diff coverage reports using diff-coverage tool.
2013-05-30 15:09:39 -04:00
Chris Dodge
4c97d16edc add hack to assets.rake to unblock the release train 2013-05-28 23:40:16 -04:00
Ned Batchelder
ebc991cce6 Merge pull request #2094 from edx/ned/make-numpy-and-scipy-both-install
Put numpy into a pre.txt so that everything will actually install.
2013-05-23 12:03:07 -07:00
Calen Pennington
69beea854c Merge pull request #2045 from edx/feature/cale/jasmine-junit-reports
Record junit reports of jasmine tests
2013-05-23 11:06:34 -07:00
chrisndodge
a8084628e1 Merge pull request #1956 from edx/feature/cdodge/autoprovision-forums-master
Feature/cdodge/autoprovision forums master
2013-05-23 09:27:36 -07:00
Calen Pennington
257dae634b Merge pull request #2090 from edx/fix/cale/amazon-ses-errors
Fix/cale/amazon ses errors
2013-05-23 09:17:51 -07:00
Jay Zoldak
e6a1a9faaf Merge branch 'master' into feature/cdodge/autoprovision-forums-master 2013-05-23 10:19:39 -04:00
Nate Hardison
daa0ac2f01 Capture Mako exit code and fail fast if necessary
Capture the exit code of the Mako template engine invocation on
asset preprocessing and abort from the Rake task on failure. This
will prevent the LMS from continuing its attempt to start up,
preventing further configuration errors.
2013-05-22 19:42:22 -07:00
Calen Pennington
b2b6ca5f7b Record junit reports of jasmine tests 2013-05-22 22:01:44 -04:00
Chris Dodge
293d0a8645 special case the db setup for the cms acceptance tests. We need the comment client database tables to be created since we're creating the DB from scratch 2013-05-22 21:58:29 -04:00
Calen Pennington
dcefd9e991 Taught rake test_lms and test_cms to run specific tests by passing a single argument 2013-05-22 21:37:48 -04:00
Nate Hardison
185ab4c35c Make Mako preprocessing a Rake task
Per feedback from @cpennington. This way we'll only preprocess once,
even if the Sass compilation is invoked multiple times.
2013-05-22 12:22:28 -07:00
Nate Hardison
ea3506d2b9 Add general theming capabilities
This commit adds the requisite settings and startup features to
enable integration of themes into the edX platform. It does not
yet provide hooks in any of the templates, but it does cause the
main `lms/static/sass/application.scss` file to `@import` a theme's
base Sass. Template hooks will come down the road.

CHANGELOG
---------
Define a new `MITX_FEATURE`, `USE_CUSTOM_THEME`, that when enabled,
can be used in templates to determine whether or not custom theme
templates should be used instead of the defaults.

Also define a new setting, `THEME_NAME`, which will be used to
locate theme-specific files. Establish the convention that themes
will be stored outside of the `REPO_ROOT`, inside the `ENV_ROOT`,
in a directory named `themes/`. `themes/<THEME_NAME>` will store
the files for a particular theme.

Provide a function, `enable_theme`, that modifies the template and
static asset load paths appropriately to include the theme's files.

Move the main LMS Sass file to a Mako template that conditionally
`@import`s the theme's base Sass file when a theme is enabled.

Add logic to the assets Rakefile to properly preprocess any Sass/
Mako templates before compiling them.
2013-05-22 12:22:27 -07:00
Ned Batchelder
9bf6281339 Merge pull request #2079 from edx/ned/fingerprint-site-packages
Fingerprint the filenames in site-packages to decide when to install req...
2013-05-21 11:37:57 -07:00
Calen Pennington
241ef68f4f Start linting envs files, add task to only pylint errors, and move pylintrc file to the correct location 2013-05-21 09:34:12 -04:00
Ned Batchelder
c947133e54 A better way to compute the hash, that gets the right hash after an install actually installs something. 2013-05-20 14:39:25 -04:00
Ned Batchelder
ec09ac7f29 Put numpy into a pre.txt so that everything will actually install. 2013-05-20 12:57:07 -04:00
Ned Batchelder
23384ca2eb Use backticks so that the command won't echo to the user. 2013-05-20 12:09:28 -04:00
Ned Batchelder
fa87a64984 Missing trailing paren 2013-05-20 12:06:36 -04:00
Ned Batchelder
5b5fbc6b14 Fingerprint the filenames in site-packages to decide when to install requirements. 2013-05-20 11:46:56 -04:00
Ned Batchelder
9834f27eb9 Fingerprint the filenames in site-packages to decide when to install requirements. 2013-05-17 18:15:40 -04:00
Ned Batchelder
5f7e856cf3 Merge pull request #2073 from edx/ned/message-if-no-install-needed
Print a message if the requirements files haven't changed.
2013-05-17 13:08:51 -07:00
Ned Batchelder
5555d41d80 OK, all the phases should have messages. 2013-05-17 16:04:24 -04:00
Calen Pennington
340d39f322 Merge pull request #2069 from edx/fix/cale/coffee-watch-on-osx
Batched coffee --watch compilation in smaller batches
2013-05-17 13:02:08 -07:00
Carlos Andrés Rocha
0042988ea7 Merge pull request #2063 from edx/feature/rocha/lets-use-celery
Add Celery configuration to LMS and CMS
2013-05-17 12:36:23 -07:00
Ned Batchelder
61f135944d Print a message if the requirements files haven't changed. 2013-05-17 14:56:44 -04:00
Calen Pennington
280f09739f Batched coffee --watch compilation in smaller batches
This is to work around an OSx issue that causes EMFILE errors in the
default configuration.
Ref: https://github.com/joyent/node/issues/2479
2013-05-17 14:22:01 -04:00
Kevin Chugh
ef3204da69 Merge pull request #2059 from edx/feature/zoldak/forum-testing
Feature/zoldak/forum testing
2013-05-17 10:10:55 -07:00
Carlos Andrés Rocha
c05efbc31e Added base Celery settings 2013-05-17 11:33:14 -04:00
Ned Batchelder
935905665c Have to look in subdirectories for requirements files. 2013-05-17 11:31:28 -04:00
Jay Zoldak
a1a33eb5e5 Fix path to phantom jasmine now that we install via node 2013-05-17 10:53:14 -04:00
John Jarvis
2fd0b1b972 Merge pull request #2054 from edx/jarv/move-edx-requirements
Jarv/move edx requirements
2013-05-16 12:13:44 -07:00
John Jarvis
a30e31213b rakefile updates 2013-05-16 12:16:21 -04:00
John Jarvis
50160592f7 new location for requirement files 2013-05-16 12:13:40 -04:00