Re: [O] tests with travis-ci

2013-03-31 Thread Yann Hodique
On Fri, Mar 22, 2013 at 10:40 AM, Yagnesh Raghava Yakkala
h...@yagnesh.org wrote:

 On Mar 22 2013, Yann Hodique yann.hodi...@gmail.com wrote:

  If so, it might be worth waiting for me to fix it (I'm afraid it's not
  there simply because I didn't need it :)). It would be sad to limit
  yourself just because of that. Assuming ert-x.el can be backported
  easily, I'll try and work on it in the coming days.

 That would be useful.

It should now be ok, with virtualenv-emacs 0.1.5 (that grabs an
ert-x.el from marmalade).

Cheers,

Yann.



Re: [O] tests with travis-ci

2013-03-22 Thread Andreas Röhler

Am 21.03.2013 21:41, schrieb Bastien:
[ ... ]

Yes.  The limitation of the pre-push hook comes from the fact that
various developers may have various testing environments, no one
should be prevented from pushing by the fact that tests do not pass
for someone else.


[ ... ]

Hi,

just to ask about some more aspects:

- Typos often will break it from the beginning, so complete tests must not run 
all every time.
  Will some testing at all is needed to detect the typos...

- org-mode has already a directory testing. It was not obvious for me how to 
make use of it.
  Exists some docu wrt available tests?

- usually you know about the range of changes.
  Limited tests checking certain features seem useful


Best,

Andreas



Re: [O] tests with travis-ci

2013-03-22 Thread Yann Hodique
 Yagnesh == Yagnesh Raghava Yakkala h...@yagnesh.org writes:

 [CC'ed to Yann Hodique to acknowledge him]

 Hello Bastien,

 I am attaching a patch, please have a look. (especially change in
 org-test.el)

 It is directly copied from Magit (with one minor change). It uses
 Yann's virtualenv-emacs¹ python package which creates multiple
 emacs environments.

Hi,

overall looks good to me. I'm glad to see that it might be useful for
others :)

 diff --git a/testing/org-test.el b/testing/org-test.el
 index 0c9ca58..5f8dd52 100644
 --- a/testing/org-test.el
 +++ b/testing/org-test.el
 @@ -79,7 +79,6 @@
   Parent major mode from which special major modes should inherit.
   (setq buffer-read-only t)))
  (require 'ert)
 -(require 'ert-x)
  (when (file-exists-p
  (expand-file-name jump/jump.el org-test-dir))
(require 'jump)

About that, is it just because my code doesn't install a working
ert-x.el for emacs 23 ?

If so, it might be worth waiting for me to fix it (I'm afraid it's not
there simply because I didn't need it :)). It would be sad to limit
yourself just because of that. Assuming ert-x.el can be backported
easily, I'll try and work on it in the coming days.

Cheers,

Yann.

-- 
The greatest and most important problems of life cannot be solved.
They can only be outgrown.

  -- SISTER JESSICA, private journal entry




Re: [O] tests with travis-ci

2013-03-22 Thread Yagnesh Raghava Yakkala

Hello Yann,

On Mar 22 2013, Yann Hodique yann.hodi...@gmail.com wrote:

 overall looks good to me. I'm glad to see that it might be useful for
 others :)

Thanks for the review. 

 About that, is it just because my code doesn't install a working
 ert-x.el for emacs 23 ?

Probably not. I thought ert-x.el is a split from the original ert.el (I may be
wrong).

 If so, it might be worth waiting for me to fix it (I'm afraid it's not
 there simply because I didn't need it :)). It would be sad to limit
 yourself just because of that. Assuming ert-x.el can be backported
 easily, I'll try and work on it in the coming days.

That would be useful.

Thanks.,
-- 
ఎందరో మహానుభావులు అందరికి వందనములు.
YYR



Re: [O] tests with travis-ci

2013-03-22 Thread Nick Dokos
Andreas Röhler andreas.roeh...@easy-emacs.de wrote:

 Am 21.03.2013 21:41, schrieb Bastien:
 [ ... ]
  Yes.  The limitation of the pre-push hook comes from the fact that
  various developers may have various testing environments, no one
  should be prevented from pushing by the fact that tests do not pass
  for someone else.
 
 [ ... ]
 
 Hi,
 
 just to ask about some more aspects:
 
 - Typos often will break it from the beginning, so complete tests must not 
 run all every time.
   Will some testing at all is needed to detect the typos...
 

Yes, run `make test'.

Bastien already added a note to Worg, asking developers to run `make
test' before pushing.  That leaves it at the discretion of the
developer, rather than having it run automatically from some hook which
might have problems of its own. I believe that once developers (any
that don't do so already) try it, they will find out the great benefits
of doing so. And then both the problem and this discussion will die down
:-)

 - org-mode has already a directory testing. It was not obvious for me how to 
 make use of it.
   Exists some docu wrt available tests?
 

What we are talking about here is running existing test cases.
For that, you just say `make test' to run the test suite.

Creating new test cases and adding them to the test suite is a different
matter of course.  There is a useful README in the testing/ directory 
and an examples/ subdir, but you can  also just pick one of the existing
tests in the lisp/ subdir and read it. Perhaps not the best example, but

  http://article.gmane.org/gmane.emacs.orgmode/62908/match=ert

shows a minimal .emacs with a test case added. It should at least
clarify the mechanics of creating and running a new test case, stripped
down to its bare essentials.

 - usually you know about the range of changes.
   Limited tests checking certain features seem useful
 

Not worth bothering about IMO: just run the whole test suite.

Nick



Re: [O] tests with travis-ci

2013-03-22 Thread Andreas Röhler

Am 22.03.2013 13:55, schrieb Nick Dokos:

Andreas Röhler andreas.roeh...@easy-emacs.de wrote:

[ ... ]

Not worth bothering about IMO: just run the whole test suite.

Nick



Hi Nick,

thanks a lot for your explanation and patience. Still digging in... :)

Andreas



Re: [O] tests with travis-ci

2013-03-21 Thread Bastien
Hi Yagnesh,

Yagnesh Raghava Yakkala h...@yagnesh.org writes:

 travis is trivial enough to start using right away. I can make a
 patch for that.

Thanks in advance for this.

 IIUC, it can't be done with travis. After little googling around, I found that
 such a conditional committing can be made if we have a continuous integration
 server (eg: jenkins) is installed and setup on org-mode server.

Yes.  The limitation of the pre-push hook comes from the fact that
various developers may have various testing environments, no one
should be prevented from pushing by the fact that tests do not pass
for someone else.

 How about using travis first.?

I fully agree.  Let me know if there is anything I should do.

Best,

-- 
 Bastien



Re: [O] tests with travis-ci

2013-03-21 Thread Yagnesh Raghava Yakkala

[CC'ed to Yann Hodique to acknowledge him]

Hello Bastien,

I am attaching a patch, please have a look. (especially change in org-test.el)

It is directly copied from Magit (with one minor change). It uses Yann's
virtualenv-emacs¹ python package which creates multiple emacs environments.

 Let me know if there is anything I should do.

1) Mirror org-mode to your github repo (https://github.com/bzg/org-mode) with 
post
   receive hook.
   does org-mode.org server uses gitolite to manage git repos?
   if so https://github.com/miracle2k/gitolite-simple-mirror may be useful. (I
   use it on my server for mirroring)

2) Allow travis to access your org-mode repository (This must be very easy) 
   - Create an account on https://travis-ci.org., just click sign in with
   github
   - activate tests org-mode repo at https://travis-ci.org/profile


From 2666c2ec2a85ca5d68f61b49081d82d1e5165a2d Mon Sep 17 00:00:00 2001
From: Yakkala Yagnesh Raghava h...@yagnesh.org
Date: Fri, 22 Mar 2013 06:37:48 +0900
Subject: [PATCH] * .travis.yml: travis-ci setup (adopted from magit sources).
 * testing/org-test.el: remove requiring ert-x (needed for  emacs-24)

Signed-off-by: Yakkala Yagnesh Raghava h...@yagnesh.org
---
 .travis.yml | 24 
 testing/org-test.el |  1 -
 2 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 .travis.yml

diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000..2334034
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,24 @@
+language: python
+python:
+  - 2.7
+env:
+  matrix:
+- EMACS=emacs
+- EMACS=emacs24
+- EMACS=emacs-snapshot
+before_install:
+  - if [ $EMACS = emacs24 ]; then
+sudo add-apt-repository -y ppa:cassou/emacs 
+sudo apt-get update -qq 
+sudo apt-get install -qq emacs24 emacs24-el;
+fi
+  - if [ $EMACS = 'emacs-snapshot' ]; then
+  sudo add-apt-repository -y ppa:cassou/emacs 
+  sudo apt-get update -qq 
+  sudo apt-get install -qq
+  emacs-snapshot-el emacs-snapshot-gtk emacs-snapshot;
+fi
+  - pip install virtualenv-emacs
+  - virtualenv_install_emacs --with-emacs=`which $EMACS`
+script:
+  make test
diff --git a/testing/org-test.el b/testing/org-test.el
index 0c9ca58..5f8dd52 100644
--- a/testing/org-test.el
+++ b/testing/org-test.el
@@ -79,7 +79,6 @@
 	Parent major mode from which special major modes should inherit.
 	(setq buffer-read-only t)))
 (require 'ert)
-(require 'ert-x)
 (when (file-exists-p
 	   (expand-file-name jump/jump.el org-test-dir))
   (require 'jump)
-- 
1.8.1.5


There are few tests failing² with emacs-23, don't know much about them.

Finally, I haven't activated (yet) email option to send an email to author of
the commit if a test fails.

Thanks.,

¹  https://github.com/sigma/virtualenv-emacs
²  https://travis-ci.org/yyr/org-mode (direct link to log: 
https://api.travis-ci.org/jobs/5698864/log.txt?deansi=true)

-- 
ఎందరో మహానుభావులు అందరికి వందనములు.
YYR