Andy Lester wrote:
> 
> On Sep 8, 2008, at 5:27 PM, Jay Pipes wrote:
> 
>> a) Simple to code tests for (i.e. anybody can do it)
> 
> 
> I'm in the middle of a project that I have to finish tonight, but if I
> have time I will write back to the list.
> 
> As it stands now, you can join in the testing fun by:
> 
> 1) Checking out lp:~petdance/drizzle/testing-overhaul

Done.

> 2) Building Drizzle

Done.  Builds fine.

> 3) Run "make dtest"

[EMAIL PROTECTED]: /home/jpipes/repos/drizzle/testing-overhaul]$
sudo make dtest
make: *** No rule to make target `dtest'.  Stop.
[EMAIL PROTECTED]: /home/jpipes/repos/drizzle/testing-overhaul]$
cat Makefile | grep dtest

Was the above a typo or was there a different make target you were
thinking of?

> 4) Go add your own t/*.dtest files.
> 5) To run only one *.dtest file, without having to run the entire "make
> dtest" suite, use this form:
> 
>    perl t/run-dtests.t t/basics.dtest

Cool, that worked, but produced a failure:

[EMAIL PROTECTED]: /home/jpipes/repos/drizzle/testing-overhaul]$
perl t/run-dtests.t t/basics.dtest
# Data dir /tmp/drizzle-mlZI
# Server: drizzled/drizzled --port=2112 --datadir=/tmp/drizzle-mlZI
--pid-file=/tmp/drizzle-mlZI/drizzled.pid > /tmp/drizzle-mlZI/startup.log
# Waiting for server startup... #1
# Waiting for server startup... #2
# Waiting for server startup... #3
# Waiting for server startup... #4
ok 1 - Starting client gives no output
ok 2 - Starting client gives no errors
ok 3 - Opened t/basics.dtest
ok 4 - t/basics.dtest: Line 1: Show tables: STDOUT
ok 5 - t/basics.dtest: Line 1: Show tables: STDERR
ok 6 - t/basics.dtest: Line 22: Count tables: STDOUT
ok 7 - t/basics.dtest: Line 22: Count tables: STDERR
ok 8 - Opened t/help.dtest
ok 9 - t/help.dtest: Line 1: Help screen: STDOUT
ok 10 - t/help.dtest: Line 1: Help screen: STDERR
/home/jpipes/repos/drizzle/testing-overhaul/client/.libs/lt-drizzleadmin:
unknown variable 'socket=/var/run/mysqld/mysqld.sock'
# Waiting for server shutdown: #1
# Waiting for server shutdown: #2
# Waiting for server shutdown: #3
# Waiting for server shutdown: #4
# Waiting for server shutdown: #5
# Waiting for server shutdown: #6
# Waiting for server shutdown: #7
# Waiting for server shutdown: #8
# Waiting for server shutdown: #9
# Waiting for server shutdown: #10
not ok 11 - Server did not shut down after 11 seconds
#   Failed test 'Server did not shut down after 11 seconds'
#   in t/run-dtests.t at line 75.
1..11
# Looks like you failed 1 test of 11.

How do I see what the error was?

> That's the basics and that should be enough to get people writing tests.
> 
> Yes, it needs more documentation, but there shouldn't be any reason
> people can't write tests.
> 
> Yes, there's no documentation on the format yet, but I bet if you look
> at a .dtest file, it will be real obvious real quick.new testing 

No problem.  But, I do have some questions about the current format.

How can I use this testing framework to test other things, like the
connectors, the APIs, C++ code?  Right now, it just seems to handle the
results of a query as displayed by the drizzle client?

My impression of early discussions was that the new testing framework
would be more modular than the existing test suite and allow a single
way to test all parts of the server and the plugin infrastructure.
Perhaps I am missing something?  If I want this testing framework to
handle tests that I write for C++ code, what do I need to do?  Do I
write the test in C++?  Your advise is welcome :)

> I know there will be the inevitable "Will it handle X?  Will it handle
> Y?" and the answer is "Yes, we will add those as necessary, but right
> now, we have all we need to test basic queries and start bringing over
> the *.test/*.result pairs from the test/ directory.

OK, understood completely.  The best way to get this done is to start a
team of contributors going on this effort by documenting the process of
converting the existing pairs into the new format, along with guidelines
on, for instance, breaking things into many smaller tests instead of
fewer large tests.  How can I help in this regard?  Shall I create some
blueprints to get the process rolling?

Cheers,

Jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to