On Sat, Mar 7, 2009 at 7:31 PM, nathan binkert <n...@binkert.org> wrote:
>> @@ -29,10 +29,18 @@
>>  import os
>>  from os.path import isdir, isfile, join as joinpath
>>
>> -homedir = os.environ['HOME']
>> -confdir = os.environ.get('M5_CONFIG', joinpath(homedir, '.m5'))
>> +
>> +confdir = os.environ.get('M5_CONFIG')
>> +
>> +if not confdir:
>> +    # HOME is not set when running regressions, due to use of scons
>> +    # Execute() function.
>
> Can you explain this a little bit better?  Who is not setting HOME?
> Is it actually SCons, or is it util/regress, or is it cron?
> If it is actually SCons, is there not some way that you can pass in
> the home directory?  does env.Execute do the right thing?

It's a side effect of using Execute()... when we ran m5 directly with
Command HOME was apparently getting set (since this worked) but now
it's not.  I verified that running Execute('env') the only things that
are set are PATH and PWD (IIRC).  I didn't try env.Execute() to see if
that worked any differently.  I figured that whether or not the
regressions pass shouldn't rely on the user's personal settings.  If
that's not the case, then we can try env.Execute() or explicitly pass
in HOME.

Nevertheless it seemed good to have the script not panic with a
cryptic python exception if HOME isn't set.

>> +# List of signals that indicate that we should retry the test rather
>> +# than consider it failed.
>> +retry_signals = (signal.SIGTERM, signal.SIGKILL, signal.SIGINT,
>> +                 signal.SIGQUIT, signal.SIGHUP)
> No big deal here, but don't forget that we can use frozenset() since
> we have a floor of python2.4.

Whatever ;-)

>>  # single "path" arg encodes everything we need to know about test
>> -(category, name, isa, opsys, config) = sys.argv[1].split('/')
>> +(category, name, isa, opsys, config) = sys.argv[1].split('/')[-5:]
> What's the deal here?  What was getting prepended?

In the previous setup you always passed in a source path relative to
m5/tests.  With the new setup that would have required a little more
effort, so now you can pass in a path relative to anything and it
works as long as the last 5 elements are right.  In particular scons
now passes in the target path, so this change is typically stripping
off something like build/ALPHA_SE/tests/fast.  But it's backwards
compatible.

Steve
_______________________________________________
m5-dev mailing list
m5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/m5-dev

Reply via email to