Nice!

Thanks to Xuefu and Serigo for your reply!
It works now!

On Tue, Oct 28, 2014 at 1:21 PM, Sergio Pena <sergio.p...@cloudera.com>
wrote:

> Hey Gordon,
>
> Now it is done in two steps.
>
> 1) Compile the main project first
> trunk# mvn clean compile -Phadoop-2   -DskipTests
>
> 2) Compile the itests/ directory second
> trunk# cd itests
> itests# mvn clean compile -Phadoop-2  -DskipTests
>
> Then, you can start the test you want (let's say you want to run
> avro_joins.q).
>
> itests# mvn test -Phadoop-2 -Dtest=TestCliDriver -Dqfile=avro_joins.q
>
> The test log will be written to itests/qtest/target/surefire-reports/
> directory.
>
> You can replace TestCliDriver with TestNegativeCliDriver if you want to run
> negative tests.
>
> If you want to overwrite tests output results (avro_joins.q.out), then you
> can append -Dtest.output.overwrite=true to the mvn command.
>
> Here's more information about the new tests command:
>
> https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ#HiveDeveloperFAQ-Whereisthelogoutputofatest
> ?
>
> Sergio
>
> On Mon, Oct 27, 2014 at 10:22 PM, Gordon Wang <gw...@pivotal.io> wrote:
>
> > Hi all,
> >
> > I am working on a hive issue and I want to add a Unit test for hive query
> > parser.
> >
> > Before hive 0.13, it is built with ant. And the query parser test cases
> > were ran with TestCliDriver.
> >
> > In current trunk, hive is built with maven. Could you give me some guide
> > about how to run TestCliDriver unit test?
> >
> > I tried " mvn clean test -Phadoop-2  -Dtest=TestCliDriver", but it didn't
> > work. Seems that TestCliDriver.java is not genrated yet.
> >
> > Many thanks.
> >
> > --
> > Regards
> > Gordon Wang
> >
>



-- 
Regards
Gordon Wang

Reply via email to