mirror of
https://git.rtems.org/rtems-tools/
synced 2025-10-20 02:28:57 +08:00
rtemstoolkit: Add unit testing for the python modules
- Add support to run the unit tests for the rtemstoolkit python modules from waf. Enter './waf test' for the tests to be run on python2 and python3. - Update the importing of rtemstoolkit modules to the standard method which works on python2 and python3. - Update the README.
This commit is contained in:
@@ -31,20 +31,10 @@
|
||||
|
||||
import os
|
||||
|
||||
#
|
||||
# Support to handle use in a package and as a unit test.
|
||||
# If there is a better way to let us know.
|
||||
#
|
||||
try:
|
||||
from . import error
|
||||
from . import execute
|
||||
from . import log
|
||||
from . import path
|
||||
except (ValueError, SystemError):
|
||||
import error
|
||||
import execute
|
||||
import log
|
||||
import path
|
||||
from rtemstoolkit import error
|
||||
from rtemstoolkit import execute
|
||||
from rtemstoolkit import log
|
||||
from rtemstoolkit import path
|
||||
|
||||
class repo:
|
||||
"""An object to manage a git repo."""
|
||||
@@ -220,7 +210,7 @@ class repo:
|
||||
|
||||
if __name__ == '__main__':
|
||||
import sys
|
||||
import options
|
||||
from rtemstoolkit import options
|
||||
long_opts = {
|
||||
# key macro handler param defs init
|
||||
}
|
||||
|
Reference in New Issue
Block a user