Changes between Version 3 and Version 4 of GSoC/2014/TestingFrameworkForGRASS
- Timestamp:
- 05/19/14 13:34:09 (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GSoC/2014/TestingFrameworkForGRASS
v3 v4 81 81 command = module.make_cmd() 82 82 # run command using valgrind if desired and module is not python script 83 # see also valgrind notes at be end of this section 83 84 if is_not_python_script(command[0]) and USE_VALGRIND: 84 85 command = ['valgrind', '--tool=...', '--xml=...', '--xml-file=...'] + command … … 127 128 Compared to suggestion in ticket:2105#comment:4 it does not solve everything in `test_module` (`run_module`) function but it uses `self.assert*` similarly to `unittest.TestCase` which (syntactically) allows to check more then one thing. 128 129 130 Modules (or any tests?) can run with `valgrind` (probably `--tool=memcheck`). This could be done on the level of testing classes but the better option is to integrate this functionality (optional running with `valgrind`). Environmental variable (GRASS_PYGRASS_VALGRIND) or additional option `valgrind_=True` (similarly to overwrite) would invoke module with `valgrind` (works for both binaries and scripts). Additional options can be passed to `valgrind` using `valgrind`'s environmental variable `$VALGRIND_OPTS`. Output would be saved in file to not interfere with module output. 131 132 129 133 == Data types to be checked == 130 134