Closed adinapoli closed 11 years ago
awesome, thanks! I will look at this tonight or tomorrow morning. I just pushed a new runHandle branch which is not quite compiling yet.
Awesome! Looking forward to seeing the code.
This morning I've noticed that HPC is still not so useful, because we need to inform HPC that Shelly.hs should be part of the source code which is scanned for test coverage. Unfortunately, at least on my machine, if I add Shelly.hs to hs-source-dirs
of the testsuite project, I get the error:
Preprocessing executable 'shelly-testsuite' for shelly-testsuite-0.1.0.0...
../src/Shelly.hs:272:0:
error: missing binary operator before token "("
Failed to install shelly-testsuite-0.1.0.0
As reported also:
http://www.haskell.org/pipermail/haskell-cafe/2012-August/102789.html http://stackoverflow.com/questions/8961413/zlib-build-error-with-ghc https://github.com/phonohawk/HsOpenSSL/issues/8
Seems to be a problem with macros not be expanded by GHC. I'll try to update my toolchain (hsc2hs, c2hs, etc), and if it doesn't work I'll bump the dependency of process in order to remove the "faulty" pragma, if it's ok for you :)
Here we go. I've also bumped appropriately some package dependency, to have a bit more tuning on the dependency management. I've also moved the source of Shelly from the root to src/*, as best practices imply.
Sorry if I'm changing a lot of things, but as far as I know everything is best-practice-driven and should improve the quality of the project :)
Finally we have proper code coverage!
A.
no need to apologize: it all sounds good
On Thu, May 16, 2013 at 12:54 AM, adinapoli notifications@github.comwrote:
Here we go. I've also bumped appropriately some package dependency, to have a bit more tuning on the dependency management. I've also moved the source of Shelly from the root to src/*, as best practices implies.
Sorry if I'm changing a lot of things, but as far as I know everything is best-practice-driven and should improve the quality of the project :)
Finally we have proper code coverage!
A.
— Reply to this email directly or view it on GitHubhttps://github.com/yesodweb/Shelly.hs/pull/37#issuecomment-17986642 .
The only thing I'm worried about is #35: if we fix the delayed output, we lose the stdout accumulation, if we use a pipe, we gain accumulation but with delayed output and stdin misfunctioning (aka the user won't be able to input stuff, e.g. go through a full cabal init; I feel the solution is really close, but I can't find it yet.
1.0-alpha branch merges test stuff. Inherit is not a fix
Hello Greg,
the test process we had before was clumsy. I've created a new test machinery based on some experience I've gained working with the Snap team. Now we have a separate cabal project were all our tests will live. Look inside
TestMain.hs
for a beautiful example of how we can execute our specs easily.Furthermore, now we have a single shell script,
testall
, which will run the main file AND call hpc on Shelly; yes, we now have test coverage!I've fixed the stderr the "Inherit" way, and tests seems to confirm that my patch is indeed correct; I had a failing test in FailureSpec.hs, applies my fix, green lights all the way down :)
Hope you like this new exciting stuff! So, to run the whole test suite:
cd test cabal install && ./testall
Enjoy!