Even without the complexities of setting up SystemC+gem5 it's pretty painful to 
"unit" test SystemC because the SystemC runtime has a lot of global state that 
comes along with it (for example: you can't "uncall" sc_start() to go back and 
re-do elaboration with different modules). The only (not very elegant) 
workaround we have discussed for unit testing SystemC modules is to just to 
build each set of related SystemC unit tests into their own independent GTest 
binaries. 

On the whole, though, GTest is pretty great. 

-----Original Message-----
From: gem5-dev [mailto:gem5-dev-boun...@gem5.org] On Behalf Of Gabe Black
Sent: Friday, November 17, 2017 5:51 PM
To: Matthias Jung <jun...@eit.uni-kl.de>
Cc: gem5 Developer List <gem5-dev@gem5.org>
Subject: [EXT] Re: [gem5-dev] testing framework

As far as a high level framework, I think whimsy should help there since it's a 
bit more decoupled and will let you run arbitrary things as tests, at least as 
far as I can tell. Since the systemC integration is just that, an integration 
of two systems, I don't think unit tests would be as applicable generally 
speaking. You could have one for some things though, like the ports that 
translate between gem5's and systemC's memory protocol.

GTest claims to be BSD, so the license should be compatible.

Gabe

On Fri, Nov 17, 2017 at 10:14 AM, Matthias Jung <jun...@eit.uni-kl.de>
wrote:

> Hey,
>
> It would be also nice if we have something that we could also use for 
> test the SystemC stuff. Right now this is not possible with the 
> current framework. Because we have to build gem5 without python as a 
> library for the SystemC stuff... and then build again with linking of the 
> gem5 library.
>
> Regards
> Matthias
>
> > Am 17.11.2017 um 17:43 schrieb Andreas Sandberg <
> andreas.sandb...@arm.com>:
> >
> > I'm generally in favour of switching to an existing unit test framework.
> > I haven't surveyed the C++ test framework landscape, but judging by 
> > the users (Chromium, LLVM, ...) GTest seems pretty solid.
> >
> > As far as I can tell, GTest is all BSD. Is that correct?
> >
> > Cheers,
> > Andreas
> >
> >> On 16/11/2017 05:04, Gabe Black wrote:
> >> Hi folks. How is the test framework integration coming along? Is 
> >> there anything I can do to help?
> >>
> >> Also, looking at the whimsy documentation and talking to some other
> folks
> >> at Google, it looks like the framework is good at running tests, 
> >> but doesn't itself really implement, for instance, unit tests which 
> >> have
> their
> >> own C++ main function, etc.
> >>
> >> Does anyone have an opinion about using the google gtest library 
> >> for writing C++ unit tests? I've only worked with it a little bit 
> >> superficially, but so far it seems pretty nice and seems like it 
> >> would
> fit
> >> into whimsy fairly well.
> >>
> >> Gabe
> >> _______________________________________________
> >> gem5-dev mailing list
> >> gem5-dev@gem5.org
> >> http://m5sim.org/mailman/listinfo/gem5-dev
> >
> > 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
> > http://m5sim.org/mailman/listinfo/gem5-dev
>
>
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to