bcaldwel@ucsd.edu bcaldwel@ucsd.edu wrote:
Brandon, Ali, and I were using the test suite and noticed that we could add some useful features. As we were playing with the code, we would run the test and some would fail. We felt it took more work than necessary to figure out which test failed. As a result we made some changes to the testsuite.
Before i start, one big disclaimer. I don't want to discourage anyone from contributing; on the contrary. All of your work is greatly appreciated, and i am glad to help where i can. That being said, i don't like this changeset, because i don't see/understand why it is required:
$ cd src/testsuite $ make check make ngircd-TEST-Binary tests.sh [..] PASS: connect-test running channel-test ... failed. FAIL: channel-test [..]
So, what we see that it fails during channel testing. $ ./start-server.sh starting server ... ok. $ expect -f channel-test.e spawn telnet localhost 6789 Trying 127.0.0.1... nick nick user user . . :User :ngircd.test.server 001 nick :Welcome to the Internet Relay Network [..] join channel :ngircd.test.server 403 nick channel :No such channel
Which shows the cause of the error (i removed the # before channel in the test suite).
Perhaps i didn't understand the intention of your patch?
While these changes add slightly more work to writing tests (adding a label) we have found them very useful when the tests don't pass. We added -s as an option instead of a default because there are some situations where the added information isn't needed and to make the change transparent to those who don't want to use it.
I don't deal with the test suite too often, and during the few times where i had to track down errors, expect -f was verbose enough for me to spot the error.
Perhaps it does make things easier for some people?, if so, please speak up :-) )
+puts ">-- who test ... " send "who\r" expect { timeout { exit 1 } ":ngircd.test.server 352 nick * ~user localhost ngircd.test.server nick H :0 Real Name"
Your email program wrapped long lines, this causes patch/git-am to fail. If your email program makes it difficult to send patches in-line, you can also try sending them as an attachment.
Florian
PS: I'd be happy to discuss/answer questions about proposed changes, so feel free to ask before you start to implement something.