Changeset b7d48ef in rtems-tools for tester


Ignore:
Timestamp:
Feb 8, 2015, 6:12:04 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.10, 4.11, master
Children:
9600c39
Parents:
7338811
Message:

Install the rtems-test command.

This installs the Python RTEMS Toolkit.

The copmiler has been switched from forcing gcc to allowing waf
to detect the host's tool chain.

Location:
tester
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • tester/rt/options.py

    r7338811 rb7d48ef  
    4949import version
    5050
     51#
     52# The path for the defaults.
     53#
     54defaults_mc = 'rtems/testing/defaults.mc'
     55
    5156class command_line(options.command_line):
    5257    """Process the command line in a common way for all Tool Builder commands."""
     
    7277def load(args, optargs = None,
    7378         command_path = None,
    74          defaults = '%{_rtdir}/rtems/testing/defaults.mc'):
     79         defaults = '%s' % (defaults_mc)):
    7580    #
    7681    # The path to this command if not supplied by the upper layers.
     
    8186            command_path = '.'
    8287    #
     88    # Check if there is a defaults.mc file under the command path. If so this is
     89    # the tester being run from within the git repo. If not found assume the tools
     90    # have been installed and the defaults is in the install prefix.
     91    #
     92    print path.join(command_path, defaults_mc)
     93    if path.exists(path.join(command_path, defaults_mc)):
     94        rtdir = command_path
     95    else:
     96        rtdir = '%{_prefix}/share/rtems/tester'
     97    defaults = '%s/%s' % (rtdir, defaults_mc)
     98    #
    8399    # The command line contains the base defaults object all build objects copy
    84100    # and modify by loading a configuration.
     
    86102    opts = command_line(args,
    87103                        optargs,
    88                         macros.macros(name = defaults,
    89                                       rtdir = command_path),
     104                        macros.macros(name = defaults, rtdir = rtdir),
    90105                        command_path)
    91106    options.load(opts)
     
    94109def run(args):
    95110    try:
    96         _opts = load(args = args, defaults = 'rtems/testing/defaults.mc')
     111        _opts = load(args = args, defaults = defaults_mc)
    97112        log.notice('RTEMS Test - Defaults, v%s' % (version.str()))
    98113        _opts.log_info()
  • tester/rt/test.py

    r7338811 rb7d48ef  
    308308        sys.exit(2)
    309309    except KeyboardInterrupt:
    310         if opts.find_arg('--stacktrace'):
     310        if opts is not None and opts.find_arg('--stacktrace'):
    311311            print '}} dumping:', threading.active_count()
    312312            for t in threading.enumerate():
  • tester/rtems-test

    r7338811 rb7d48ef  
    3333base = os.path.dirname(os.path.abspath(sys.argv[0]))
    3434parent = os.path.dirname(base)
    35 sys.path = [base, parent] + sys.path
     35rtems = os.path.join(parent, 'share', 'rtems')
     36sys.path = [base, parent, rtems] + sys.path
    3637
    3738try:
  • tester/rtems/testing/defaults.mc

    r7338811 rb7d48ef  
    7676_localedir:          dir,     none,     '%{_datadir}/locale'
    7777_localstatedir:      dir,     none,     '%{_prefix}/var'
    78 _prefix:             dir,     none,     '%{_usr}'
    7978_usr:                dir,     none,     '/usr/local'
    8079_usrsrc:             dir,     none,     '%{_usr}/src'
  • tester/wscript

    r7338811 rb7d48ef  
    11#
    22# RTEMS Tools Project (http://www.rtems.org/)
    3 # Copyright 2014 Chris Johns (chrisj@rtems.org)
     3# Copyright 2015 Chris Johns (chrisj@rtems.org)
    44# All rights reserved.
    55#
     
    3535        ctx.recurse(sd)
    3636
    37 def options(ctx):
    38     recurse(ctx)
     37def options(opt):
     38    recurse(opt)
     39    opt.load('python')
    3940
    4041def configure(ctx):
    4142    recurse(ctx)
     43    conf.load('python')
     44    conf.check_python_version((2,7,3))
    4245
    43 def build(ctx):
    44     recurse(ctx)
     46def build(bld):
     47    recurse(bld)
     48
     49    #
     50    # Install the tester code.
     51    #
     52    bld(features = 'py',
     53        source = ['rt/__init__.py',
     54                  'rt/bsps.py',
     55                  'rt/config.py',
     56                  'rt/console.py',
     57                  'rt/gdb.py',
     58                  'rt/options.py',
     59                  'rt/report.py',
     60                  'rt/stty.py',
     61                  'rt/test.py',
     62                  'rt/version.py'],
     63        install_path = '${PREFIX}/share/rtems/rt')
     64    bld(features = 'py',
     65        source = ['rt/pygdb/__init__.py',
     66                  'rt/pygdb/mi_parser.py',
     67                  'rt/pygdb/spark.py'],
     68        install_path = '${PREFIX}/share/rtems/rt/pygdb')
     69    bld.install_files('${PREFIX}/bin', ['rtems-test'], chmod = 0755)
     70    bld.install_files('${PREFIX}/bin', ['rtems-test'], chmod = 0755)
     71
     72    #
     73    # Install the tester configuration files.
     74    #
     75    config = bld.path.find_dir('rtems')
     76    bld.install_files('${PREFIX}/share/rtems/tester/rtems',
     77                      config.ant_glob('**', excl=['*~']),
     78                      cwd = config,
     79                      relative_trick = True)
    4580
    4681def install(ctx):
Note: See TracChangeset for help on using the changeset viewer.