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 | ||||
---|---|---|---|---|
|
...
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
Location: core/sql/regress
Directory | Usage |
---|---|
charsets | Tests Character Sets. |
compGeneral | Compiler test suite; tests optimizer-specific features. |
core | Tests a subset/sample of all features from all the test suites. |
executor | Tests the SQL Executor. |
fullstack2 | Similar to core but a very limited subset. |
hive | Tests HDFS access to Hive tables. |
newregr | Unused/Saved repository for some unpublished features. These are not run. |
qat | Tests basic DDL and DML syntax. |
privs1 | Privilege tests part 1 - authorization setup, utilities, misc |
privs2 | Privilege tests part 2 - grants and revokes |
seabase | Tests JNI interface to HBase. |
tools | Regression driver scripts and general regression scripts. |
udr | Tests 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 | ||
---|---|---|
| ||
cd $MY$TRAF_SQROOTHOME/rundir grep FAIL */runregr-sb.log |
...
Do the following:
Code Block | ||
---|---|---|
| ||
cd $MY$TRAF_SQROOTHOME . ./sqenv.sh cd $MY$TRAF_SQROOTHOME/../sql/regress tools/runallsb |
Code Block | ||||
---|---|---|---|---|
| ||||
cd $MY$TRAF_SQROOTHOME . ./sqenv.sh cd $MY$TRAF_SQROOTHOME/../sql/regress tools/runallsb charsets |
...
Code Block | ||
---|---|---|
| ||
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 | ||
---|---|---|
| ||
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> |
...