[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-hardware-devel
Subject:    Re: [Kde-hardware-devel] Testing programs using Solid
From:       Kevin Ottens <ervin () kde ! org>
Date:       2008-02-10 17:36:51
Message-ID: 200802101836.51724.ervin () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


Le Thursday 07 February 2008, Chris Gow a écrit :
> Ideally, I would like to be able to do something like:
> - For my unit test harness, instantiate a dummy device manager. This should
> only affect the current running program, not replace the system solid
> manager.
>
> - Feed the dummy manager test devices that implement the particular
> interface it looks for. These test devices would be completely fake, but
> should look and behave like real devices.

All your dreams are already fullfilled. You just need to set the SOLID_FAKEHW 
environment variable to point to the file containing the data to feed the 
fake backend.

We have a pretty generic file to use with the fake backend:
kdelibs/solid/solid/backends/fakehw/fakecomputer.xml

I use that for all my tests. You might want to take a look at 
kdelibs/solid/tests/* and kdelibs/kfile/tests/kfileplacesmodeltest.cpp

Regards.
-- 
Kévin 'ervin' Ottens, http://ervin.ipsquad.net
"Ni le maître sans disciple, Ni le disciple sans maître,
Ne font reculer l'ignorance."


["signature.asc" (application/pgp-signature)]

_______________________________________________
Kde-hardware-devel mailing list
Kde-hardware-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-hardware-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic