Re: [gem5-dev] Review Request: util/regress: make default action a more thorough regression

2011-05-20 Thread nathan binkert
>
> So I played around with this, and the first problem is that your current code 
> can't handle default values.  I fixed that in options.py, but it still 
> doesn't print the defaults nicely, e.g., instead of:
>
>   --test-variants=TEST_VARIANTS
> comma-separated build variants to test (default:
> 'opt')
>   --compile-variants=VARIANTS
> comma-separated build variants to compile only (not
> test) (default: 'debug,fast')
>
> we get:
>
> --test-variants=TEST_VARIANTS
> comma-separated build variants to test (default:
> '['opt']')
> --compile-variants=VARIANTS
> comma-separated build variants to compile only (not
> test) (default: '['debug', 'fast']')
>
> Not tragic, but I like the former better, so I may keep the original solution.
>
>
Maybe overkill, but you could probably subclass list and simply define a new
__str__ for it to get the printout that you like.

  Nate
___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: util/regress: make default action a more thorough regression

2011-05-20 Thread Steve Reinhardt


> On 2011-04-21 13:37:08, Nathan Binkert wrote:
> > util/regress, line 76
> > 
> >
> > I have nicer code for this sort of thing.  You can see it in 
> > src/python/m5/options.py, examples of usage in main.py
> > 
> > Look for action='append' (and notice the necessity of split)
> 
> Steve Reinhardt wrote:
> So I played around with this, and the first problem is that your current 
> code can't handle default values.  I fixed that in options.py, but it still 
> doesn't print the defaults nicely, e.g., instead of:
> 
>   --test-variants=TEST_VARIANTS
> comma-separated build variants to test (default:
> 'opt')
>   --compile-variants=VARIANTS
> comma-separated build variants to compile only 
> (not
> test) (default: 'debug,fast')
> 
> we get:
> 
> --test-variants=TEST_VARIANTS
> comma-separated build variants to test (default:
> '['opt']')
> --compile-variants=VARIANTS
> comma-separated build variants to compile only 
> (not
> test) (default: '['debug', 'fast']')
> 
> Not tragic, but I like the former better, so I may keep the original 
> solution.
>

On further consideration, 'append' is not even what I want, if the user gives a 
list I want it to replace (not append to) any existing list.


- Steve


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/649/#review1140
---


On 2011-04-20 22:42:16, Steve Reinhardt wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/649/
> ---
> 
> (Updated 2011-04-20 22:42:16)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> util/regress: make default action a more thorough regression
> 
> Changed the --variants option to --test-variants and added a new
> --compile-variants option for variants that are only compiled
> (not tested).  The former still defaults to 'opt' and the latter
> defaults to 'debug,fast'.
> 
> Also changed the behavior when no tests are specified from just
> compiling to running the 'quick' tests.
> 
> As a result, a plain 'util/regress' invocation will now compile
> (but not test) the debug and fast builds, and compile and run the
> quick regressions on the opt build.  This should be the default
> set of tests that are run before committing.  Since the nightly
> regressions use this same script, this will also be the new
> nightly regression behavior.
> 
> Test-only regressions can still be done by setting --compile=''.
> Compile-only regressions can be done by setting --test=''.
> 
> 
> Diffs
> -
> 
>   util/regress a9d06c894afe 
> 
> Diff: http://reviews.m5sim.org/r/649/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Steve
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev


Re: [gem5-dev] Review Request: util/regress: make default action a more thorough regression

2011-05-20 Thread Steve Reinhardt


> On 2011-04-21 13:37:08, Nathan Binkert wrote:
> > util/regress, line 76
> > 
> >
> > I have nicer code for this sort of thing.  You can see it in 
> > src/python/m5/options.py, examples of usage in main.py
> > 
> > Look for action='append' (and notice the necessity of split)

So I played around with this, and the first problem is that your current code 
can't handle default values.  I fixed that in options.py, but it still doesn't 
print the defaults nicely, e.g., instead of:

  --test-variants=TEST_VARIANTS
comma-separated build variants to test (default:
'opt')
  --compile-variants=VARIANTS
comma-separated build variants to compile only (not
test) (default: 'debug,fast')

we get:

--test-variants=TEST_VARIANTS
comma-separated build variants to test (default:
'['opt']')
--compile-variants=VARIANTS
comma-separated build variants to compile only (not
test) (default: '['debug', 'fast']')

Not tragic, but I like the former better, so I may keep the original solution.


- Steve


---
This is an automatically generated e-mail. To reply, visit:
http://reviews.m5sim.org/r/649/#review1140
---


On 2011-04-20 22:42:16, Steve Reinhardt wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> http://reviews.m5sim.org/r/649/
> ---
> 
> (Updated 2011-04-20 22:42:16)
> 
> 
> Review request for Default, Ali Saidi, Gabe Black, Steve Reinhardt, and 
> Nathan Binkert.
> 
> 
> Summary
> ---
> 
> util/regress: make default action a more thorough regression
> 
> Changed the --variants option to --test-variants and added a new
> --compile-variants option for variants that are only compiled
> (not tested).  The former still defaults to 'opt' and the latter
> defaults to 'debug,fast'.
> 
> Also changed the behavior when no tests are specified from just
> compiling to running the 'quick' tests.
> 
> As a result, a plain 'util/regress' invocation will now compile
> (but not test) the debug and fast builds, and compile and run the
> quick regressions on the opt build.  This should be the default
> set of tests that are run before committing.  Since the nightly
> regressions use this same script, this will also be the new
> nightly regression behavior.
> 
> Test-only regressions can still be done by setting --compile=''.
> Compile-only regressions can be done by setting --test=''.
> 
> 
> Diffs
> -
> 
>   util/regress a9d06c894afe 
> 
> Diff: http://reviews.m5sim.org/r/649/diff
> 
> 
> Testing
> ---
> 
> 
> Thanks,
> 
> Steve
> 
>

___
gem5-dev mailing list
gem5-dev@m5sim.org
http://m5sim.org/mailman/listinfo/gem5-dev