diff options
| author | Antony Lesuisse <lesuisse@gmail.com> | 2014-05-29 18:33:04 +0200 |
|---|---|---|
| committer | Antony Lesuisse <lesuisse@gmail.com> | 2014-05-29 18:33:04 +0200 |
| commit | d4624fa826a5e9542782f2c53c8ba2c766d093bc (patch) | |
| tree | be214779eb6d1f17157aa48e72fbcbf95405e38b /openerpcommand/grunt_tests.py | |
| parent | 045ecc603e67911a5390c812cb6b5b123d9c190e (diff) | |
[IMP] repository cleanup
- move packaging stuff to setup
- remove historical stuff
- remove oe, odoo-cmd-fme will be merged with the convered commands
- add an odoo.py script to run odo and boostrap it
- simplify README
- prepare to move documentation to the github wiki
Diffstat (limited to 'openerpcommand/grunt_tests.py')
| -rw-r--r-- | openerpcommand/grunt_tests.py | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/openerpcommand/grunt_tests.py b/openerpcommand/grunt_tests.py deleted file mode 100644 index db2513f2bc0..00000000000 --- a/openerpcommand/grunt_tests.py +++ /dev/null @@ -1,50 +0,0 @@ -""" -Search for Gruntfile.js files in all the addons and launch them using the 'grunt test' command. -""" - -import common -import fnmatch -import os -import re -import sys -import subprocess - -def grunt_tester(directories, log = sys.stdout): - result = 0 - - matches = [] - for direc in directories: - for root, dirnames, filenames in os.walk(direc): - for filename in fnmatch.filter(filenames, 'Gruntfile.js'): - full = os.path.join(root, filename) - if re.match(r"(^.*?/node_modules/.*$)|(^.*?/lib/.*$)", full): - continue - matches.append(full) - - for file_ in matches: - folder = os.path.dirname(file_) - p = subprocess.Popen(['npm', 'install'], cwd=folder) - if p.wait() != 0: - raise Exception("Failed to install dependencies for Gruntfile located in folder %s" % folder) - - p = subprocess.Popen(['grunt', 'test', '--no-color'], cwd=folder, stdout=log, stderr=log) - if p.wait() != 0: - result = 1 - - return result - -def run(args): - if args.addons: - args.addons = args.addons.split(':') - else: - args.addons = [] - result = grunt_tester(args.addons) - if result != 0: - sys.exit(result) - -def add_parser(subparsers): - parser = subparsers.add_parser('grunt-tests', - description='Run the tests contained in Gruntfile.js files.') - common.add_addons_argument(parser) - - parser.set_defaults(run=run) |
