<div dir="ltr"><div>The BSP Builder builds multiple BSPs at the same time. At one point, I </div><div>thought waf had a problem with that. Has that been resolved.</div><div><br></div><div>Are the config files and build directories sufficiently unique</div><div>(BSP only isn't unique enough I think) for this to work with waf?</div><div><br></div><div>This is a step in the right direction but still might have issues with</div><div>concurrency. Just asking.</div><div><br></div><div>--joel</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 20, 2021 at 12:13 AM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Looks fine (on my phone)<br>
<br>
Thanks for this<br>
<br>
> On 20 May 2021, at 1:25 am, Ryan Long <<a href="mailto:ryan.long@oarcorp.com" target="_blank">ryan.long@oarcorp.com</a>> wrote:<br>
> <br>
> Closes #4124<br>
> ---<br>
> config/rtems-bsps.ini | 28 ++++++++++++++--------------<br>
> tester/rt/check.py    | 35 ++++++++++++++++++++++++++---------<br>
> 2 files changed, 40 insertions(+), 23 deletions(-)<br>
> <br>
> diff --git a/config/rtems-bsps.ini b/config/rtems-bsps.ini<br>
> index 93156fb..d5de667 100644<br>
> --- a/config/rtems-bsps.ini<br>
> +++ b/config/rtems-bsps.ini<br>
> @@ -156,23 +156,23 @@ smp-network-debug = config:base, config:smp, config:network, config:debug<br>
> #<br>
> # Base set of configure options every build needs.<br>
> #<br>
> -base = --target=@ARCH@-rtems@RTEMS_VERSION@<br>
> -       --enable-rtemsbsp=@BSP@<br>
> -       --prefix=@PREFIX@<br>
> +base = --prefix=@PREFIX@<br>
> +       --top=@RTEMS@<br>
> +       --rtems-config=config-@ARCH@-@BSP@-@BUILD@.ini<br>
> #<br>
> # Tests.<br>
> #<br>
> -tests = --enable-tests<br>
> +tests = BUILD_TESTS=True<br>
> #<br>
> # The options for each varations.<br>
> #<br>
> -debug             = --enable-rtems-debug<br>
> -no-debug          = --disable-rtems-debug<br>
> -profiling         = --enable-profiling<br>
> -no-profiling      = --disable-profiling<br>
> -smp               = --enable-smp<br>
> -no-smp            = --disable-smp<br>
> -posix             = --enable-posix<br>
> -no-posix          = --disable-posix<br>
> -network           = --enable-networking<br>
> -no-network        = --disable-networking<br>
> +debug             = RTEMS_DEBUG=True<br>
> +no-debug          = RTEMS_DEBUG=False<br>
> +profiling         = RTEMS_PROFILING=True<br>
> +no-profiling      = RTEMS_PROFILING=False<br>
> +smp               = RTEMS_SMP=True<br>
> +no-smp            = RTEMS_SMP=False<br>
> +posix             = RTEMS_POSIX_API=True<br>
> +no-posix          = RTEMS_POSIX_API=False<br>
> +network           = RTEMS_NETWORKING=True<br>
> +no-network        = RTEMS_NETWORKING=False<br>
> diff --git a/tester/rt/check.py b/tester/rt/check.py<br>
> index 2a38d99..95fa47e 100755<br>
> --- a/tester/rt/check.py<br>
> +++ b/tester/rt/check.py<br>
> @@ -906,7 +906,9 @@ class build_jobs:<br>
>             remove += [b for b in self.builds if e in b.split('-')]<br>
>         self.builds = [b for b in self.builds if b not in remove]<br>
>         self.build_set = { }<br>
> -        exclude_options = ' ' + config.exclude_options(self.arch, self.bsp)<br>
> +        exclude_options = config.exclude_options(self.arch, self.bsp)<br>
> +        if exclude_options != '':<br>
> +            exclude_options = ' ' + exclude_options<br>
>         for build in self.builds:<br>
>             self.build_set[build] = config.build_options(build) + exclude_options<br>
> <br>
> @@ -938,9 +940,7 @@ class builder:<br>
>                                  'BSP'     : '.*libbsp/.*',<br>
>                                  'LibCPU'  : '.*libcpu/.*',<br>
>                                  'Shared'  : '.*shared/.*' })<br>
> -        if not path.exists(path.join(rtems, 'configure')) or \<br>
> -           not path.exists(path.join(rtems, 'Makefile.in')) or \<br>
> -           not path.exists(path.join(rtems, 'cpukit')):<br>
> +        if not path.exists(path.join(rtems, 'waf')):<br>
>             raise error.general('RTEMS source path does not look like RTEMS')<br>
> <br>
>     def _bsps(self, arch):<br>
> @@ -952,15 +952,30 @@ class builder:<br>
>         job_index = 1<br>
>         for job in jobs:<br>
>             tag = '%*d/%d' % (max_job_size, job_index, len(jobs))<br>
> +            commands = self._commands(job, build_job_count)<br>
> +            self._create_config(job, commands)<br>
>             build_jobs += [arch_bsp_builder(self.results,<br>
>                                             job,<br>
> -                                            self._commands(job, build_job_count),<br>
> +                                            commands,<br>
>                                             self.build_dir,<br>
>                                             tag)]<br>
>             job_index += 1<br>
>         set_max_build_label(build_jobs)<br>
>         return build_jobs<br>
> <br>
> +    def _create_config(self, job, commands):<br>
> +        filename = 'config-%s-%s-%s.ini' % (job.arch, job.bsp, job.build)<br>
> +        cfg_file = open(path.join(self.rtems, filename),'w+')<br>
> +        cfg_file.write('[%s/%s]' + os.linsep() % (job.arch, job.bsp))<br>
> +        new_cfg_cmds = []<br>
> +        for option in commands['configure'].split():<br>
> +            if 'waf' in option or '--' in option or 'configure' in option:<br>
> +                new_cfg_cmds += [option]<br>
> +            else:<br>
> +                cfg_file.write(option + os.linesep())<br>
> +        commands['configure'] = ' '.join(new_cfg_cmds)<br>
> +        cfg_file.close()<br>
> +<br>
>     def _commands(self, build, build_jobs):<br>
>         commands = { 'dry-run'  : self.options['dry-run'],<br>
>                      'no-clean' : self.options['no-clean'],<br>
> @@ -968,16 +983,18 @@ class builder:<br>
>                      'build'    : None }<br>
>         cmds = build.build_config.split()<br>
>         cmds += self.config.bspopts(build.arch, build.bsp)<br>
> -        cmd = [path.join(self.rtems, 'configure')]<br>
> +        cmd = [path.join(self.rtems, 'waf') + ' configure']<br>
>         for c in cmds:<br>
>             c = c.replace('@PREFIX@', self.prefix)<br>
> -            c = c.replace('@RTEMS_VERSION@', str(self.rtems_version))<br>
>             c = c.replace('@ARCH@', build.arch)<br>
>             c = c.replace('@BSP@', build.bsp)<br>
> +            c = c.replace('@RTEMS@', self.rtems)<br>
> +            c = c.replace('@BUILD@', build.build)<br>
>             cmd += [c]<br>
>         commands['configure'] = ' '.join(cmd)<br>
> -        cmd = 'make -j %s' % (build_jobs)<br>
> -        commands['build'] = cmd<br>
> +        commands['build'] = path.join(self.rtems, 'waf')<br>
> +        commands['build'] += ' --top %s' % (self.rtems)<br>
> +        commands['build'] += ' -j %s' % (build_jobs)<br>
>         return commands<br>
> <br>
>     def _update_file_counts(self, counts):<br>
> -- <br>
> 1.8.3.1<br>
> <br>
> _______________________________________________<br>
> devel mailing list<br>
> <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
> <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
<br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div></div>