Skip to content

OCCT Automatic Testing System

Denis Barbier edited this page Jan 14, 2014 · 6 revisions

OpenCASCADE released their automatic testing system both on their git repository and in official releases. But many input files come from their customers and are confidential, so they are not available.

Running the testsuite

OpenCASCADE automatic testing system is based on tcl scripts launched in DRAWEXE. Unlike OCE Testing Suite, there is no need to compile tests, so there is no specific configuration option to build tests. To run tests, check OCE_USE_TCL_TEST_FRAMEWORK from the cmake-gui frontend, then run

$ make occt-tests
.

The OCE_USE_TCL_TEST_FRAMEWORK CMake option will generate two files in the build directory:

  • DrawLaunchTests.draw contains DRAWEXE commands to run all tests. Normally it contains only the following two lines
testgrid
return
  • DrawLaunchTests.cmake is a CMake script which runs
    DRAWEXE -f testgrid
    after setting several environment variables to tell DRAWEXE where to find libraries and resource files.

Invoking

$ make occt-tests

runs

cmake -P DrawLaunchTests.cmake

so one also run the latter command directly.

Analyzing results

Running testsuite will create in the build directory a directory named results_branch name_date, for instance results_master_2014-01-12T2321; the main report is stored in a file summary.html, which contains links to output logs and individual reports.

On Linux, output looks like:

Status Description
157 BAD Known problem
2 FAILED Test failed (regression)
1 IMPROVEMENT Possible improvement (expected problem not detected)
4939 OK Test passed OK
11476 SKIPPED Test skipped due to lack of data file
Failed:
  bugs fclasses	bug7287_5
  demo samples

Improvements:
  boolean bopfuse_simple ZP6

In the report, there are links to detailed output, so that one can read the error message. Here, bug7287_5 complains about memory leaks, and samples about missing bottle.tcl sample file.

Debugging

By default, tests are run in parallel. One can specify the number of parallel tasks by editing DrawLaunchTests.draw; for instance to run tests sequentially, replace testgrid by testgrid -parallel 1. This is the first thing to try in order to see if errors come from parallel execution. It is also possible to run only a subset of tests by specifying group in DrawLaunchTests.draw

testgrid bugs
testgrid demo
Clone this wiki locally