All of lore.kernel.org
 help / color / mirror / Atom feed
* How to run tests in bmcweb
@ 2019-11-01  8:59 Lei YU
  2019-11-01 16:21 ` James Feist
  0 siblings, 1 reply; 3+ messages in thread
From: Lei YU @ 2019-11-01  8:59 UTC (permalink / raw)
  To: OpenBMC Maillist

I am trying to add a unit test case in bmcweb and run it.
With local CI, the tests are not run:

 WORKSPACE=$(pwd) UNIT_TEST_PKG=bmcweb
./openbmc-build-scripts/run-unit-test-docker.sh
 ...
 [100%] Built target bmcweb
 /home/leiyu/work/bmcweb > ctest .
 Test project /home/leiyu/work/bmcweb
 No tests were found!!!
 ...

So the question is, how do I run tests in bmcweb? Should
openbmc-build-scripts be updated to support that?

Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to run tests in bmcweb
  2019-11-01  8:59 How to run tests in bmcweb Lei YU
@ 2019-11-01 16:21 ` James Feist
  2019-11-05  5:39   ` Lei YU
  0 siblings, 1 reply; 3+ messages in thread
From: James Feist @ 2019-11-01 16:21 UTC (permalink / raw)
  To: Lei YU, OpenBMC Maillist

On 11/1/19 1:59 AM, Lei YU wrote:
> I am trying to add a unit test case in bmcweb and run it.
> With local CI, the tests are not run:
> 
>   WORKSPACE=$(pwd) UNIT_TEST_PKG=bmcweb
> ./openbmc-build-scripts/run-unit-test-docker.sh
>   ...
>   [100%] Built target bmcweb
>   /home/leiyu/work/bmcweb > ctest .
>   Test project /home/leiyu/work/bmcweb
>   No tests were found!!!
>   ...
> 
> So the question is, how do I run tests in bmcweb? Should
> openbmc-build-scripts be updated to support that?

I believe the tests in bmcweb have degraded and stopped working, so they 
were disabled. I haven't run them myself, so I'm not sure how bad they 
degraded. If you want to try to run them locally you need to pass
-DBMCWEB_BUILD_UT=1 when you run the cmake command.

https://github.com/openbmc/bmcweb/blob/c78d791eb1fa9d12e987e7b1ad885ada92d0757a/CMakeLists.txt#L292


openbmc-build-scripts is fine the way it is, if the unit tests are fixed 
then we can simply change if (BMCWEB_BUILD_UT) into if (NOT 
YOCTO_DEPENDENCIES) and the build scripts know how to take over.

https://github.com/openbmc/bmcweb/blob/c78d791eb1fa9d12e987e7b1ad885ada92d0757a/CMakeLists.txt#L206

FWIW Entity-manager has an example of running tests in CMake that works 
with openbmc-build-scripts 
https://github.com/openbmc/entity-manager/blob/f2ad76b32cea5170a5a9a631f49935ae3dd4626d/CMakeLists.txt#L113


-James

> 
> Thanks!
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to run tests in bmcweb
  2019-11-01 16:21 ` James Feist
@ 2019-11-05  5:39   ` Lei YU
  0 siblings, 0 replies; 3+ messages in thread
From: Lei YU @ 2019-11-05  5:39 UTC (permalink / raw)
  To: James Feist; +Cc: OpenBMC Maillist

On Sat, Nov 2, 2019 at 12:21 AM James Feist <james.feist@linux.intel.com> wrote:
>
> On 11/1/19 1:59 AM, Lei YU wrote:
> > I am trying to add a unit test case in bmcweb and run it.
> > With local CI, the tests are not run:
> >
> >   WORKSPACE=$(pwd) UNIT_TEST_PKG=bmcweb
> > ./openbmc-build-scripts/run-unit-test-docker.sh
> >   ...
> >   [100%] Built target bmcweb
> >   /home/leiyu/work/bmcweb > ctest .
> >   Test project /home/leiyu/work/bmcweb
> >   No tests were found!!!
> >   ...
> >
> > So the question is, how do I run tests in bmcweb? Should
> > openbmc-build-scripts be updated to support that?
>
> I believe the tests in bmcweb have degraded and stopped working, so they
> were disabled. I haven't run them myself, so I'm not sure how bad they
> degraded. If you want to try to run them locally you need to pass
> -DBMCWEB_BUILD_UT=1 when you run the cmake command.
>
> https://github.com/openbmc/bmcweb/blob/c78d791eb1fa9d12e987e7b1ad885ada92d0757a/CMakeLists.txt#L292

I tried to enable BMCWEB_BUILD_UT and build it in local-ci, and it
really is broken badly.

Output posted at Pastebin: https://pastebin.com/1pMWSM3N

May I ask the maintainers to fix the tests in bmcweb? So that it makes
the community easier to contribute code into bmcweb.
Thanks!

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-11-05  5:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-01  8:59 How to run tests in bmcweb Lei YU
2019-11-01 16:21 ` James Feist
2019-11-05  5:39   ` Lei YU

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.