Skip to content

Tests in CORAL and COOL short version#

There are lots of tests included in CORAL and COOL projects. They are meant to be run to check if all the functionalities work as expected. The full suite of tests takes a long time to run (20 minutes for CORAL and 2hours for COOL), so there is a reduced set of tests that are run in the nightlies.

The script to run the full suite of tests is <git-repo-folder>/<binary-tag>/qmtestRun.sh The script to run the nightly suite of tests is <git-repo-folder>/<binary-tag>/run_nightly_tests_cmake.sh

When commiting changes to the git repositories of CORAL or COOL, the CI/CD runs the full tests suites. You can check what is done in .gitlab-ci.yml.

Running a single test#

There are 2 scripts that you can run to set the environment properly: <git-repo-folder>/<binary-tag>/cc-run for a single command, and <git-repo-folder>/<binary-tag>/cc-sh to get a shell. For some tests, 3 environmnent variables need to be set (CORAL_AUTH_PATH, CORAL_DBLOOKUP_PATH and TNS_ADMIN). They are needed to get the connection strings, and passwords to connect to the test databases for MySQL and Oracle. If you have access to EOS on the test machine, you can set them like this:

export CORAL_AUTH_PATH=/eos/user/c/cdelort/coral-cool-auth
export CORAL_DBLOOKUP_PATH=/eos/user/c/cdelort/coral-cool-auth
export TNS_ADMIN=/eos/project/o/oracle/public/admin/

Otherwise you should copy the following files locally: /eos/user/c/cdelort/coral-cool-auth/dblookup.xml, /eos/user/c/cdelort/coral-cool-auth/authentication.xml, and /eos/project/o/oracle/public/admin/tnsnames.ora and export the variables accordingly. Once they are set, here are some examples of tests you can run from the folder <git-repo-folder>/<binary-tag>:

  • ./cc-run test_CoolKernel_Record: execute the Record test from the original shell
  • ./cc-sh and then test_CoolKernel_Record to execute the Record test from a COOL shell
  • ./qmtestRun.sh coolkernel.record to execute the Record test within the general qmtest wrapper (run ./cc-run qmtest -D CoolTest/qmtest/ ls -R to list all tests)
  • ./qmtestRun.sh coolkernel.record coolkernel.recordadapter to execute the Record and RecordAdapter tests within the general qmtest wrapper
  • ./qmtestRun.sh to execute the full test suite within the general qmtest wrapper (this defaults to executing the ALL test suite)
  • ./qmtestRun.sh ALL to execute the full test suite within the general qmtest wrapper
  • ./qmtestRun.sh QUICK to execute the quick test suite within the general qmtest wrapper
  • ./run_nightly_tests_cmake.sh to execute the quick (nightly) test suite within the nightly qmtest wrapper

If you need to debug, you can get more verbose output by setting these variables: export CORAL_MSGLEVEL=v or export COOL_MSGLEVEL=v.