Hi Nate, I don't have an opinion on where the refs go and how that relates to the UnitTest subclass, but I do want to second a couple of the items you mentioned. I really like the idea of explicitly having users specify an existence of a test rather than just relying on the ref directory and test.py being in the right place. I also like the possibility of allowing users to add their own regression tests via scons EXTRAS.
I'm excited to see these changes happen, let me know if you need any help. Brad -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of nathan binkert Sent: Tuesday, March 02, 2010 9:54 PM To: M5 Developer List Subject: [m5-dev] tests Ok, so I'm going to try to make some progress on the tests stuff, and one of the issues is trying to name/specify tests. Right now, we have tests/(long|quick)/[0-9]{2}\.*/test.py that specifies the basics of the test. We also have directories like tests/long/00.hello/ref/arm/linux/simple-atomic. The key parts to a test are the test itself, the isa, the opsys, and the config. A test exists simply if a test.py exists in the right place and there is a ref directory for a particular test. My goal is to involve SCons a bit more and actually have users specify the existence of a test via a statement like: def Test(name, start, *args, **kwargs) start could be a filename/object which would be evaluated in a new environment and the function would be called with the various parameters and would be expected to return a unittest object. Alternatively, start could simply be a function which *args and **kwargs being called, or start could be a unittest object. _00_hello_arm_linux_simple_atomic = Test('00.hello', '00.hello.py:make_test', 'arm', 'linux', 'simple-atomic') I'd also like to have test groups like this: TestGroup('quick', [_00_hello_arm_linux_simple_atomic, ...]) So, this leaves me with two questions, what should the directory structure look like, and where should the refs go? Should I just make it so that the refs directory is a parameter to Test, or should I make it part of some UnitTest subclass? I don't want to go with the current system because I'd really like to add our m5/unittest directory to the test system, and I'd also like to be able to put tests in EXTRAS. Thoughts? Steve? I'm happy to try to hash this out over the phone. Nate _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
