You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Gordon Wang <gw...@pivotal.io> on 2014/10/28 04:22:52 UTC

How to run TestCliDriver Unit Test

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

Re: How to run TestCliDriver Unit Test

Posted by Gordon Wang <gw...@pivotal.io>.
Nice!

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

On Tue, Oct 28, 2014 at 1:21 PM, Sergio Pena <se...@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

Re: How to run TestCliDriver Unit Test

Posted by Sergio Pena <se...@cloudera.com>.
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
>

Re: How to run TestCliDriver Unit Test

Posted by Xuefu Zhang <xz...@cloudera.com>.
You need to run the command in itests directory.

--Xuefu

On Mon, Oct 27, 2014 at 8:41 PM, Gordon Wang <gw...@pivotal.io> wrote:

> + hive user group. :)
>
> ---------- Forwarded message ----------
> From: Gordon Wang <gw...@pivotal.io>
> Date: Tue, Oct 28, 2014 at 11:22 AM
> Subject: How to run TestCliDriver Unit Test
> To: dev@hive.apache.org
>
>
> 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
>

RE: How to run TestCliDriver Unit Test

Posted by "Xu, Cheng A" <ch...@intel.com>.
Please refer to https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ#HiveDeveloperFAQ-HowdoIupdatetheoutputofaCliDrivertestcase?

From: Gordon Wang [mailto:gwang@pivotal.io]
Sent: Tuesday, October 28, 2014 11:41 AM
To: user
Cc: Gordon Wang
Subject: Fwd: How to run TestCliDriver Unit Test

+ hive user group. :)

---------- Forwarded message ----------
From: Gordon Wang <gw...@pivotal.io>>
Date: Tue, Oct 28, 2014 at 11:22 AM
Subject: How to run TestCliDriver Unit Test
To: dev@hive.apache.org<ma...@hive.apache.org>

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

RE: How to run TestCliDriver Unit Test

Posted by "Xu, Cheng A" <ch...@intel.com>.
Please refer to https://cwiki.apache.org/confluence/display/Hive/HiveDeveloperFAQ#HiveDeveloperFAQ-HowdoIupdatetheoutputofaCliDrivertestcase?

From: Gordon Wang [mailto:gwang@pivotal.io]
Sent: Tuesday, October 28, 2014 11:41 AM
To: user
Cc: Gordon Wang
Subject: Fwd: How to run TestCliDriver Unit Test

+ hive user group. :)

---------- Forwarded message ----------
From: Gordon Wang <gw...@pivotal.io>>
Date: Tue, Oct 28, 2014 at 11:22 AM
Subject: How to run TestCliDriver Unit Test
To: dev@hive.apache.org<ma...@hive.apache.org>

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

Fwd: How to run TestCliDriver Unit Test

Posted by Gordon Wang <gw...@pivotal.io>.
+ hive user group. :)

---------- Forwarded message ----------
From: Gordon Wang <gw...@pivotal.io>
Date: Tue, Oct 28, 2014 at 11:22 AM
Subject: How to run TestCliDriver Unit Test
To: dev@hive.apache.org


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