Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Excerpt

Contains information describing how to test Trafodion using the Trafodion test libraries and automated build tests.

Note: A recent pull request, https://github.com/apache/incubator-trafodion/pull/869, changed the name of $MY_SQROOT to $TRAF_HOME. This page has been changed accordingly. If you are on an older code base, use $MY_SQROOT instead of $TRAF_HOME.

 

...

Table of Contents
maxLevel4
indent20px

...

If adding a new feature, then check that it is either covered by an existing regression test or add a new test to an existing test suite.

Test Suites

Locationcore/sql/regress

DirectoryUsage
charsetsTests Character Sets.
compGeneralCompiler test suite; tests optimizer-specific features.
coreTests a subset/sample of all features from all the test suites.
executorTests the SQL Executor.
fullstack2Similar to core but a very limited subset.
hiveTests HDFS access to Hive tables.
newregr

Unused/Saved repository for some unpublished features. These are not run.

qatTests basic DDL and DML syntax.
privs1Privilege tests part 1 - authorization setup, utilities, misc
privs2Privilege tests part 2 - grants and revokes
seabaseTests JNI interface to HBase.
toolsRegression driver scripts and general regression scripts.
udrTests the User Defined Routines (UDR) and TMUDF functionality.

Check Test Results

On completion, the test run prints out a test summary. All tests should pass, or pass with known differences.

Test results are written to the runregr-sb.log file in each component’s directory. Therefore, you can check the test results after the fact as follows:

Code Block
languagebash
cd $MY$TRAF_SQROOTHOME/rundir
grep FAIL */runregr-sb.log

...

Do the following:

Code Block
languagebash
cd $MY$TRAF_SQROOTHOME
. ./sqenv.sh
cd $MY$TRAF_SQROOTHOME/../sql/regress
tools/runallsb
Code Block
languagebash
titleExample: Run Individual Test Suites
cd $MY$TRAF_SQROOTHOME
. ./sqenv.sh
cd $MY$TRAF_SQROOTHOME/../sql/regress
tools/runallsb charsets

...

 

Code Block
languagebash
cd $MY$TRAF_SQROOTHOME/../sql/regress/<suite>

# You can add the following two exports to .bashrc or .profile for convenience
export rundir=$MY$TRAF_SQROOTHOME/rundir
export scriptsdir=$MY$TRAF_SQROOTHOME/../sql/regress

# run the test
cd $rundir/<suite>
$scriptsdir/<suite>/runregr -sb <test>

...

 

Code Block
languagebash
cd $MY$TRAF_SQROOTHOME/../sql/regress/<suite>

# You can add the following two exports to .bashrc or .profile for convenience
export rundir=$MY$TRAF_SQROOTHOME/rundir
export scriptsdir=$MY$TRAF_SQROOTHOME/../sql/regress
mkdir $rundir
cd $rundir

# <suitename> should match the name of each directory in $scriptsdir
mkdir <suitename>

# run the test
cd $rundir/<suite>
$scriptsdir/<suite>/runregr -sb <test>

...