aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-01-07ptest-runner: Add support to report duration of each ptestv2.3Aníbal Limón
In stdout reported as, ... BEGIN: ptest-dir ... DURATION: N END: ptest-dir ... In XML reported as, ... <testcase classname='test1' name='run-ptest'> <duration>N</duration> </testcase> ... Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2019-01-03ptest-runner: Add support timeout failure type to XML result fileAníbal Limón
The ptest-runner support logging results to stdout and to a XML file in stdout the ptest is mark as: ... ERROR: Exit status is 1 TIMEOUT: ptest-directory ... Add the same support in XML file for example, ... <testcase classname='ptest-directory' name='run-ptest'> <failure type='exit_code' message='run-ptest exited with code: 1'></failure> <failure type='timeout'/> </testcase> ... [YOCTO #13088] Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2018-04-25main.c: Add option (-e) to exclude certain tests for executionv2.2Aníbal Limón
You can specify a set of ptests to be excluded, it will not fail if some ptest excluded isn't found in the list of execution. $ ./ptest-runner -e "hang glibc" -d tests/data Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2018-04-25main.c: Use realpath to get the actual directory of ptestsAníbal Limón
Fix usage of relative paths in -d argument. $ ./ptest-runner -d ./tests/data Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2017-12-12README.md: Update to my current emailv2.1.1Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2017-12-12Add support to avoid load/run twice a run_ptest scriptAníbal Limón
In some ptest packages exists symlink in the ptest directory causing to load/run twice the same ptest, For example in perl5: /usr/lib/perl -> /usr/lib/perl5 Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2017-12-12Makefile: libcheck now requires to link subunitAníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
2017-11-02utils.c: Prefer monotonic clock to calculate elapsed timeJeffrey Pautler
The current implementation uses the system clock to calculate how long a ptest has been running with no output. If a ptest changes the system clock as part of the test, that can cause the current implementation to falsely trigger a timeout or miss an actual timeout. It is preferrable to use a monotonic clock for calculating elapsed time in order to avoid these issues. This change tries to use the monotonic clock first and falls back to the realtime clock if the monotonic clock is not supported. Signed-off-by: Jeffrey Pautler <jeffrey.pautler@ni.com>
2017-05-29timeout option missing the argument option ":" to getoptAnders Wallin
ptest-runner -t xx gives segfault Signed-off-by: Anders Wallin <wallinux@gmail.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-04-06Add xml outputv2.1Pascal Bach
The format follow the one defined in the Yocto wiki: https://wiki.yoctoproject.org/wiki/QA/xUnit_XML_Template It is only the minimum required but it can be extended in the future. Signed-off-by: Schuler Christian <schuler.christian@siemens.com> Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-04-06utils, main: Add ptest_options struct to run_ptestsPascal Bach
This allows to easily add additional parameters. Signed-off-by: Pascal Bach <pascal.bach@siemens.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-04-06utils.c: Improve user notice of TIMEOUTv2.0.2Aníbal Limón
Print exit status before TIMEOUT to give clear information to the user about exit status before TIMEOUT and END. [YOCTO #10842] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-09-22tests/utils.c: run_timeout_ptest remove unnecessary codev2.0.1Aníbal Limón
Now the run_timeout_ptest runs only one test so is not needed to detect when this ptest starts as before. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-09-22tests/utils.c: Add test case for run_ptest failureEdwin Plauchu
This test case covers the case when a run-ptest script fails and prints ERROR in the output. [YOCTO #9752] Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-09-22tests/utils.c: Refactor test_run_ptestsEdwin Plauchu
Now test_run_ptests only runs succesful ptests, this commit creates test_timeout_ptest for test TIMEOUT run-ptest script. Also creates new functions for run specific ptest and search for specific output in this case TIMEOUT. Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@linux.intel.com Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-09-22utils.c: Add error report when run-ptests failsEdwin Plauchu
If some run-ptest script fails the user needs to be noticed so add print "ERROR" when fork fail or run-ptest exits different than zero. [YOCTO #9752] Signed-off-by: Edwin Plauchu <edwin.plauchu.camacho@linux.intel.com> Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-09-20README.md: Add Contributions section.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-03-29README.md: Update to point to git.yoctoproject.org repository.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-14wait_child, run_ptests: Display ptest directory instead of ptest scriptv2.0v0.1Aníbal Limón
Comply with old ptest-runner behaviour displaying ptest directory in, BEGIN, END and TIMEOUT lines. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-14utils.c: run_child adds missing chdirAníbal Limón
ptest-runner shell script currently change to the ptest directory before call run-ptest. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-14Create README.mdAnibal Limón
2016-01-14Add support for enable mcheck/mtrace.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-14Makefile: Add RELEASE env variable.Aníbal Limón
When RELEASE env var is enabled the ptest-runner is compiled with optimizations otherwise is compiled with debug information. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-14tests/utils.c: Add full testcase for run_ptests.Aníbal Limón
- Case all tests. - Case of hang also adds data for simulate hang. - Case for read data in stderr. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-13run_ptests: Fixes and improvements.Aníbal Limón
- run_child: Fix pipe setup for capture output. - wait_child: Change usage of select for poll and fix TIMEOUT write now to stdout. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12Adds full support for run_ptests.Aníbal Limón
run_ptests: Takes every ptests and executes it using fork/excve if timeout is enabled it look at stdout, stderr ptest output if no have output in more than N secods kills it. tests/data: Add simple run-ptest scripts for with echo name of the ptests. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12main.c: Add full logic for get ptests and run it only missingAníbal Limón
run_ptest implementation. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12utils: Add run_ptests function skeleton.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12utils: Add filter_ptests and testcase.Aníbal Limón
This function is used when user specify only certain ptests to run. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12tests/utils.c: Move useful data to static scope for use in other tests.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12tests/{ptest_list,utils}.c: Adds testcase for validate NULL parameters.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12ptest_list.c, utils.c: Add valitaion of NULL parameters in functions.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12utils.c: print_ptests remove explicit extern to match the current convenion.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-12utils.c: Adds better unit test for compare output.Aníbal Limón
Signed-off-by: Aníbal Limón <limon.anibal@gmail.com>
2016-01-11utils.c: Add print_ptests function with testcase.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-11Add support for get_available_ptests.Aníbal Limón
- ptest_list.h: Add macros for make easy free'ing ptest_list. - utils.c: Add get_available_ptests function, search over specific directory and returns ptest_list. - tests/utils.c: Adds test suite with get_available_ptests test. - tests/data: Add data for support get_available_ptests test. - Makefile: Add check rule for execute ptest-runner-test. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-08Add GPLv2 LICENSE information.Aníbal Limón
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-08ptest_list.c: Add module for load ptests into a linkedlistAníbal Limón
tests: Add ptest_list testsuite using check framework. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2016-01-07Initial commit,Aníbal Limón
Adding main program with option parse and utils module. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>