hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iw...@apache.org
Subject incubator-hawq git commit: HAWQ-948. README.md for feature test
Date Mon, 25 Jul 2016 05:42:30 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master 95f337ce4 -> dbcbe0fce

HAWQ-948. README.md for feature test

Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/dbcbe0fc
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/dbcbe0fc
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/dbcbe0fc

Branch: refs/heads/master
Commit: dbcbe0fce69ef2a250ca48740774e973c3ee6beb
Parents: 95f337c
Author: xunzhang <xunzhangthu@gmail.com>
Authored: Mon Jul 25 12:24:01 2016 +0800
Committer: xunzhang <xunzhangthu@gmail.com>
Committed: Mon Jul 25 13:15:19 2016 +0800

 README.md                  |  4 ++--
 src/test/feature/README.md | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 40 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 86a6cf5..8175a17 100644
--- a/README.md
+++ b/README.md
@@ -3,10 +3,10 @@
 [Website](http://hawq.incubator.apache.org/) |
 [Wiki](https://cwiki.apache.org/confluence/display/HAWQ/Apache+HAWQ+Home) |
 [Documentation](http://hdb.docs.pivotal.io/) |
-[Devolper Mailing List](mailto:dev@hawq.incubator.apache.org) |
+[Developer Mailing List](mailto:dev@hawq.incubator.apache.org) |
 [User Mailing List](mailto:user@hawq.incubator.apache.org) |
 [Q&A Collections](https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=65144284)
-[Open Defect](https://issues.apache.org/jira/browse/HAWQ) |
+[Open Defect](https://issues.apache.org/jira/browse/HAWQ)
 # Apache HAWQ

diff --git a/src/test/feature/README.md b/src/test/feature/README.md
new file mode 100644
index 0000000..229c7c4
--- /dev/null
+++ b/src/test/feature/README.md
@@ -0,0 +1,38 @@
+This folder contains the feature tests of apache HAWQ. The feature test library is written
based on google test. Users and developers could run these tests after successfully installed
apache HAWQ.
+# Build 
+`cd $HAWQ_HOME`
+`make feature-test`
+`make feature-test-clean`
+Also, you could enter the `$HAWQ_HOME/src/test/feature` folder to `make` and `make clean`.

+Before building the code of feature tests part, just make sure your compiler supports C++11
and you have apache HAWQ successfully compiled.
+# Run
+1. Make sure HAWQ is running correctly. If not, `init` or `start` HAWQ at first.
+2. Load environment configuration by running `source $INSTALL_PREFIX/greenplum_path.sh`.
+3. Load hdfs configuration. For example, `export HADOOP_HOME=/Users/wuhong/hadoop-2.7.2 &&
export PATH=${PATH}:${HADOOP_HOME}/bin`. Since some test cases need `hdfs` and `hadoop` command,
just ensure these commands work before running. Otherwise you will get failure.
+4. Run `./feature-test`, you could use `--gtest_filter` option to filter test cases(both
positive and negative patterns are supported). Please see more options by running `./feature-test
+# Development
+In contribution to HAWQ, we suggest developers submitting feature tests related to your feature
development. In writting a featurte test, you need to write a cpp file inside corresponding
folders. There are two recommended way to write this cpp file:
+1. Check every single sql clause and bundle the test utility inside one case. This way is
not that readable but it is much better in quality. See `ExternalSource/test_errortbl.cpp`
for example. 
+2. Write a `sql` file for sql utility test related to your feature and a `.ans` which lists
the expected output. Lots of current cases are written in this manner. For sql plan cases,
you should include two sperate sql files linking to `OCAR` on and off.
+Refer to `testlib/test_lib.cpp` for detialed usage. The APIs are listed in `lib/sql_util.h`.

+You don't need to modify `Makefile`, it will automatively handle new .
+# Troubleshooting
+If some cases failed in your environment, check it out with the generated `.diff` files:
`find . -name "*.out.diff"`. There files show the difference between the expected output(`.ans`)
and the real output(`.out`) which you could find if seperate subfolders after running.
+There are some cases expected to be fail in specific environment which need to be fixed later
on. Don't worry about that.
+# Reference
+[Design Doc](https://issues.apache.org/jira/secure/attachment/12811319/GoogleTest.pdf)

View raw message