bwlewis / rredis

R client for Redis
http://illposed.net/
93 stars 25 forks source link

add support for unit testing from building package (including at GitHub) #18

Closed eddelbuettel closed 10 years ago

eddelbuettel commented 10 years ago

Brian, I am testing most (all?) of my R packages via Travis, and given that Travis relies on Ubuntu, I figured it would useful to have it test against an actual redis server. As I noticed that you already had RUnit tests, I just did the minimal additions to have these tickled -- if and only if an environment variable (currently: RunRRedisTests) is loaded with the right value (currently: yes). So CRAN builds would not get this, heck your own builds would not get it unless you set the variable. But GitHub commits now trigger checks. I missed the need RUnit at first, but trial 2 succeeded. Feel free to discard the Pull Request if you find it too invasive, and/or hit me up on Google Chat / email if you have general questions regarding Travis. Cheers, Dirk

bwlewis commented 10 years ago

Hi Dirk,

I'll review later this week. I think it will be fine. I like the idea of controlling tests with an environment variable.