On Fri, Dec 03, 2021 at 01:13:12PM -0700, Simon Glass wrote: > On Fri, 3 Dec 2021 at 00:55, Andy Shevchenko <andy.shevche...@gmail.com> > wrote: > > On Friday, December 3, 2021, Simon Glass <s...@chromium.org> wrote: > >> On Tue, 30 Nov 2021 at 12:04, Andy Shevchenko > >> <andriy.shevche...@linux.intel.com> wrote:
... > >> This look useful, but we cannot rely on 'srcdir' being in the > >> environment. > > > > True and code is aware of that. Nothing needs to be fixed. > > What am I missing? > > $ binman test > Traceback (most recent call last): > File "/home/sglass/bin/binman", line 23, in <module> > srctree = os.environ['srctree'] > File "/usr/lib/python3.8/os.py", line 675, in __getitem__ > raise KeyError(key) from None > KeyError: 'srctree' I see, you mean that you run it when it's not in build tree? > >> For example, most binman development is done just by > >> running 'binman test' in the source tre. So perhaps default to the > >> current directory is 'srcdir' is not set? Ah, you mean you run it manually and not via `make`. os.environ.get('srctree', '') should help I suppose. P.S. What is the 'srcdir' you are referring to all the time? -- With Best Regards, Andy Shevchenko