I think I've got a solution to this (in my head at least), I'll try to push a patch today.
I like having all the tests runnable in the `test` directory with `./main.py`, so it irks me this is a bit of a special case (not that we don't already have a few special cases, most notable the GTests). I think I can work this in a way to be runnable within the `tests` directory and work as a presubmit test. -- Dr. Bobby R. Bruce Room 2235, Kemper Hall, UC Davis Davis, CA, 95616 web: https://www.bobbybruce.net On Mon, Apr 19, 2021 at 6:55 AM Giacomo Travaglini < giacomo.travagl...@arm.com> wrote: > Yes, > > This is why I usually run using tests/gem5 as root directory > > ./tests/main.py [...] \ > tests/gem5 <- root directory > > Testlib is basically trying to load every python file it finds on its walk. > We should definitely add python unit tests to our presubmit runs IMHO. The > simplest way is via unittest Test Discovery [1] > > Kind Regards > > Giacomo > > [1]: > https://docs.python.org/3/library/unittest.html#unittest-test-discovery > > > -----Original Message----- > > From: Bobby Bruce via gem5-dev <gem5-dev@gem5.org> > > Sent: 19 April 2021 13:43 > > To: gem5 Developer List <gem5-dev@gem5.org> > > Cc: Gabe Black <gabe.bl...@gmail.com>; Bobby Bruce > > <bbr...@ucdavis.edu> > > Subject: [gem5-dev] Re: error from new test_convert.py? > > > > The exception being thrown is "No module named 'm5'". m5 is not in the > > path, but could easily be added. > > > > From looking at https://gem5- > > review.googlesource.com/c/public/gem5/+/39377, this was never intended > > to be run via `main.py`, though "test_convert.py" has the "test" prefix > so our > > TestLib framework tries to run it anyway. > > > > My questions are: when were these tests meant to be run? Should they be > > incorporated into the TestLib (i.e. those tests run via `main.py`) to be > run as a > > Presubmit, Nightly, or Weekly test? This would be easy to do (I think I > could > > incorporate this relatively quickly). > > > > Kind regards, > > Bobby > > > > -- > > > > Dr. Bobby R. Bruce > > Room 2235, > > Kemper Hall, UC Davis > > Davis, > > CA, 95616 > > > > > > web: https://www.bobbybruce.net > > > > > > > > On Sun, Apr 18, 2021 at 9:35 PM Gabe Black via gem5-dev <gem5- > > d...@gem5.org <mailto:gem5-dev@gem5.org> > wrote: > > > > > > Hi gem5 devs, specifically Andreas. I was just running the regressions > > on a change I'm working on, and I noticed this message: > > > > Exception thrown while loading > > "/home/gblack/gem5/work/tests/pyunit/util/test_convert.py" > > Ignoring all tests in this file. > > > > FYI, it looks like these tests are not runnng... > > _______________________________________________ > > gem5-dev mailing list -- gem5-dev@gem5.org <mailto:gem5- > > d...@gem5.org> > > To unsubscribe send an email to gem5-dev-le...@gem5.org > > <mailto:gem5-dev-le...@gem5.org> > > %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s > > IMPORTANT NOTICE: The contents of this email and any attachments are > confidential and may also be privileged. If you are not the intended > recipient, please notify the sender immediately and do not disclose the > contents to any other person, use it for any purpose, or store or copy the > information in any medium. Thank you. >
_______________________________________________ gem5-dev mailing list -- gem5-dev@gem5.org To unsubscribe send an email to gem5-dev-le...@gem5.org %(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s