Hi,

If I wanted to unit-test SimObjects, especially one which itself contains SimObjects (e.g. the Cache, which contains Tags), I was wondering if there is a way to easily instantiate such objects. Perhaps by running some C++ and python magic, like gem5 does when instantiating them for simulation.

I have done a unit-test on non-SimObject classes (e.g. on the basis of src/base/trietest.cc) but not sure what to put in the "GTest(...)" in the SConscript (e.g. in src/base/SConscript for the trietest.cc) so that the generated C++ parameters classes are included, thus I am not sure how to generate SimObject C++ classes even manually. Perhaps the best way would be to have constructors for the unit-tests? This doesn't seem that scalable, so could I have some advice please?

Thanks,
Robert
_______________________________________________
gem5-users mailing list
gem5-users@gem5.org
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to