Experimental Physics and Industrial Control System
|
Hi Tom,
With regard to base tests, I have indeed tried writing unit tests with the epicsUnitTest.h but one quirk I could not understand is why I have to count up all
the asserts and add that number to the testPlan as an argument.
Do people run a script to count them or do you simply run it once to fail and then use that number?
It wasn’t a big issue, it is just a bit more overhead compared to other testing libraries.
Providing the test count is optional, but it’s there so the harness can detect if the test program crashes before it has completed all of the tests. During test program development you can call
testPlan(0) at the start and everything will work just fine, but we recommend that you fill in the count once you’ve finished adding tests or you can miss out on the check that it did actually run all of them. This also encourages
you to ensure that every test reports a single pass or fail result
An old parser for the TAP format for the Jenkins CI software didn’t originally check the count at all, and we had several occasions where a test seg-faulted on one architecture but the job passed because the parser didn’t realize there was a problem.
HTH,
- Andrew
--
Complexity comes for free, simplicity you have to work for.
|
- References:
- Unit testing IOCs and databases Stainer Tom via Tech-talk
- Re: Unit testing IOCs and databases Ralph Lange via Tech-talk
- RE: Unit testing IOCs and databases Stainer Tom via Tech-talk
- Navigate by Date:
- Prev:
RE: Unit testing IOCs and databases Freddie Akeroyd - STFC UKRI via Tech-talk
- Next:
Re: Data acquisition storage retrieval, post analysis and visualization. J. Lewis Muir via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: Unit testing IOCs and databases Simon Rose via Tech-talk
- Next:
Re: Unit testing IOCs and databases Torsten Bögershausen via Tech-talk
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
<2021>
2022
2023
2024
|
ANJ, 07 Sep 2021 |
·
Home
·
News
·
About
·
Base
·
Modules
·
Extensions
·
Distributions
·
Download
·
·
Search
·
EPICS V4
·
IRMIS
·
Talk
·
Bugs
·
Documents
·
Links
·
Licensing
·
|