ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* ConTeXt unit testing
@ 2010-06-05 15:13 Yury G. Kudryashov
  2010-06-05 15:43 ` Mojca Miklavec
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Yury G. Kudryashov @ 2010-06-05 15:13 UTC (permalink / raw)
  To: ntg-context

Hi!

Are there any automatic unit test for ConTeXt distribution? At least the bug 
with referenceformat can be catched using something like

context test
pdftotext test.pdf test.txt
diff test.txt test.txt-good

And the bug with broken footnote can be catched using just "context test".

If there are unit test, where can I find them (I'd like to add more)?
If there are no, any objections against adding them, and testing before 
releasing new beta?

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-05 15:13 ConTeXt unit testing Yury G. Kudryashov
@ 2010-06-05 15:43 ` Mojca Miklavec
  2010-06-05 16:14   ` Otared Kavian
  2010-06-05 19:05 ` luigi scarso
  2010-06-06  8:51 ` Mojca Miklavec
  2 siblings, 1 reply; 14+ messages in thread
From: Mojca Miklavec @ 2010-06-05 15:43 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
>
> If there are no, any objections against adding them, and testing before
> releasing new beta?

No, just go on. Any volunteer with some ideas to start a project is welcome.

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-05 15:43 ` Mojca Miklavec
@ 2010-06-05 16:14   ` Otared Kavian
  0 siblings, 0 replies; 14+ messages in thread
From: Otared Kavian @ 2010-06-05 16:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 3164 bytes --]

Hi Yuri and Mojca,

As far as I am concerned, I have a little file named « basic-test.tex » containing the lines below: eveytime I update the minimals (well… almost everytime), before doing so, I proceed as follows:
1) I make a backup copy of my existing and working context-minimals

2) I run first-setup.sh to update to the latest context-minimals

3) I typeset the file « basic-test.tex »: if everything works I keep a zipped archive of the old installation and I delete the backup copy. If the new installation doesn't work I delete the updated context-minimals and go back to my old installation (and I complain to Mojca, Hans, Taco, and the list…).

Here is this little file:
%% file basic-test.tex
\starttext
\chapter{Testing a chapter\footnote{Actually for testing footnotes in a chapter header\dots}}

This file has been typeset 
on \currentdate{} 
at \currenttime, 
with 
\doifmodeelse{mkiv}
	{mkiv, 
	LuaTeX version \the\luatexversion,
	LuaTeX revision \luatexrevision,
	(LuaTeX date stamp \luatexdatestamp),
	using the command: \crlf
	\type{context basic-test.tex}\crlf}
	{mkii, 
	using the command: \crlf
	\type{texexec basic-test.tex} \crlf}
	ConTeXt version \contextversion.

\section{Testing a section\footnote{Actually for testing footnotes in a section header\dots}}

An elementary identity: $(a + b)^2 = a^2 + 2ab + b^2$. And a well-known identity due to Leonhard Euler in which the five most important numbers appear:
\placeformula
\startformula
{\rm e}^{{\rm i}\pi} + 1 = 0.
\stopformula
By the way, $\int_{0}^{2\pi} \sin(x)dx = 0$, while
\startformula
\int_{0}^{2\pi} \sin^2(x)dx = \pi.
\stopformula

\startitemize[r]

\item Testing items and footnotes\footnote{This is a silly remark\dots}

\item\footnote{This is a silly remark, inside an item\dots} testing items and footnotes

\stopitemize

And a final test\footnote{This is another silly remark but outside items\dots}  of a footnote.

\stoptext

%% end file basic-test.tex

Best regards: OK

On 5 juin 2010, at 17:43, Mojca Miklavec wrote:

> On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
>> 
>> If there are no, any objections against adding them, and testing before
>> releasing new beta?
> 
> No, just go on. Any volunteer with some ideas to start a project is welcome.
> 
> Mojca
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
> 
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________

%%%%%%%%%%%%%%%%%%
Otared Kavian
Département de Mathématiques
Université de Versailles Saint-Quentin
Bâtiment Fermat
45 aveue des Etats Unis
78035 Versailles cedex

Téléphone: +33 1 39 25 46 42
Secrétariat: +33 1 39 25 46 44 
Secrétariat: +33 1 39 25 46 46

e-mail: Otared.Kavian@math.uvsq.fr




[-- Attachment #1.2: Type: text/html, Size: 5436 bytes --]

[-- Attachment #2: Type: text/plain, Size: 486 bytes --]

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-05 15:13 ConTeXt unit testing Yury G. Kudryashov
  2010-06-05 15:43 ` Mojca Miklavec
@ 2010-06-05 19:05 ` luigi scarso
  2010-06-06  8:51 ` Mojca Miklavec
  2 siblings, 0 replies; 14+ messages in thread
From: luigi scarso @ 2010-06-05 19:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

yes we have. At next ctx meeting i will show something.(post from mobile sorry)

On 6/5/10, Yury G. Kudryashov <urkud@ya.ru> wrote:
> Hi!
>
> Are there any automatic unit test for ConTeXt distribution? At least the bug
> with referenceformat can be catched using something like
>
> context test
> pdftotext test.pdf test.txt
> diff test.txt test.txt-good
>
> And the bug with broken footnote can be catched using just "context test".
>
> If there are unit test, where can I find them (I'd like to add more)?
> If there are no, any objections against adding them, and testing before
> releasing new beta?
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl /
> http://www.ntg.nl/mailman/listinfo/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
>


-- 
luigi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-05 15:13 ConTeXt unit testing Yury G. Kudryashov
  2010-06-05 15:43 ` Mojca Miklavec
  2010-06-05 19:05 ` luigi scarso
@ 2010-06-06  8:51 ` Mojca Miklavec
  2010-06-06  9:05   ` Taco Hoekwater
  2 siblings, 1 reply; 14+ messages in thread
From: Mojca Miklavec @ 2010-06-06  8:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
> Hi!
>
> Are there any automatic unit test for ConTeXt distribution?

I'm thinking that we might want to set up one on a server. My idea is
as follows:
- set up one complete repository that's regularly updated
- install ConTeXt from there and try if everything works fine
- only if all tests are passed, sync to another public/default
repository, else send an email to Hans, me & co. notifying about the
failure

Any ideas welcome.

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06  8:51 ` Mojca Miklavec
@ 2010-06-06  9:05   ` Taco Hoekwater
  2010-06-06  9:14     ` Mojca Miklavec
  0 siblings, 1 reply; 14+ messages in thread
From: Taco Hoekwater @ 2010-06-06  9:05 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Mojca Miklavec wrote:
> On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
>> Hi!
>>
>> Are there any automatic unit test for ConTeXt distribution?
> 
> I'm thinking that we might want to set up one on a server. 

We already have a server for tests:

   http://foundry.supelec.fr/gf/project/contexttest/


Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06  9:05   ` Taco Hoekwater
@ 2010-06-06  9:14     ` Mojca Miklavec
  2010-06-06 10:37       ` Taco Hoekwater
  0 siblings, 1 reply; 14+ messages in thread
From: Mojca Miklavec @ 2010-06-06  9:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Jun 6, 2010 at 11:05, Taco Hoekwater wrote wrote:
> Mojca Miklavec wrote:
>> On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
>>>
>>> Are there any automatic unit test for ConTeXt distribution?
>>
>> I'm thinking that we might want to set up one on a server.
>
> We already have a server for tests:
>
>  http://foundry.supelec.fr/gf/project/contexttest/

Yes, but some metadata is missing and some architecture to actually
run those tests (some tests only make sense in MKII and some only in
MKIV etc.).

I would definitely prefer if some function "run_the_unit_tests"
existed, but we probably need to write one first.

Mojca
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06  9:14     ` Mojca Miklavec
@ 2010-06-06 10:37       ` Taco Hoekwater
  2010-06-06 11:12         ` Yury G. Kudryashov
  0 siblings, 1 reply; 14+ messages in thread
From: Taco Hoekwater @ 2010-06-06 10:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Mojca Miklavec wrote:
> On Sun, Jun 6, 2010 at 11:05, Taco Hoekwater wrote wrote:
>> Mojca Miklavec wrote:
>>> On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
>>>> Are there any automatic unit test for ConTeXt distribution?
>>> I'm thinking that we might want to set up one on a server.
>> We already have a server for tests:
>>
>>  http://foundry.supelec.fr/gf/project/contexttest/
> 
> Yes, but some metadata is missing and some architecture to actually
> run those tests (some tests only make sense in MKII and some only in
> MKIV etc.).
> 
> I would definitely prefer if some function "run_the_unit_tests"
> existed, but we probably need to write one first.

Just saying there is no need for yet another server  (you cannot
run tests server-side anyway).

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06 10:37       ` Taco Hoekwater
@ 2010-06-06 11:12         ` Yury G. Kudryashov
  2010-06-06 11:14           ` Taco Hoekwater
  2010-06-06 11:51           ` Peter Münster
  0 siblings, 2 replies; 14+ messages in thread
From: Yury G. Kudryashov @ 2010-06-06 11:12 UTC (permalink / raw)
  To: ntg-context

Taco Hoekwater wrote:

> Mojca Miklavec wrote:
>> On Sun, Jun 6, 2010 at 11:05, Taco Hoekwater wrote wrote:
>>> Mojca Miklavec wrote:
>>>> On Sat, Jun 5, 2010 at 17:13, Yury G. Kudryashov wrote:
>>>>> Are there any automatic unit test for ConTeXt distribution?
>>>> I'm thinking that we might want to set up one on a server.
>>> We already have a server for tests:
>>>
>>>  http://foundry.supelec.fr/gf/project/contexttest/
>> 
>> Yes, but some metadata is missing and some architecture to actually
>> run those tests (some tests only make sense in MKII and some only in
>> MKIV etc.).
>> 
>> I would definitely prefer if some function "run_the_unit_tests"
>> existed, but we probably need to write one first.
> 
> Just saying there is no need for yet another server  (you cannot
> run tests server-side anyway).

Why? I was talking about fully automatic tests, not tests like "compile and 
open result in the viewer". I understand that there is not too much 
functionality that can be tested automatically (hence, server-side), but at 
least some basic things can be tested.

Probably, more features can be tested server-side analyzing the result pdf 
file using some library (though I don't know the pdf-parsing libraries 
sufficiently good to implement it).

___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06 11:12         ` Yury G. Kudryashov
@ 2010-06-06 11:14           ` Taco Hoekwater
  2010-06-06 11:53             ` Peter Münster
  2010-06-06 11:51           ` Peter Münster
  1 sibling, 1 reply; 14+ messages in thread
From: Taco Hoekwater @ 2010-06-06 11:14 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Yury G. Kudryashov wrote:
> 
> Why? I was talking about fully automatic tests, not tests like "compile and 
> open result in the viewer". I understand that there is not too much 
> functionality that can be tested automatically (hence, server-side), but at 
> least some basic things can be tested.

But if it fails you will most likely end up with a stuck server.

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06 11:12         ` Yury G. Kudryashov
  2010-06-06 11:14           ` Taco Hoekwater
@ 2010-06-06 11:51           ` Peter Münster
  2010-06-06 11:53             ` Taco Hoekwater
  1 sibling, 1 reply; 14+ messages in thread
From: Peter Münster @ 2010-06-06 11:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Jun 06 2010, Yury G. Kudryashov wrote:

> Probably, more features can be tested server-side analyzing the result pdf 
> file using some library (though I don't know the pdf-parsing libraries 
> sufficiently good to implement it).

Perhaps it's just sufficient to convert the pdf to an image, and compare it
pixel by pixel. Then you can test nearly all automatically (hyperlinks will
be difficult though).

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06 11:14           ` Taco Hoekwater
@ 2010-06-06 11:53             ` Peter Münster
  2010-06-06 11:54               ` Taco Hoekwater
  0 siblings, 1 reply; 14+ messages in thread
From: Peter Münster @ 2010-06-06 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Sun, Jun 06 2010, Taco Hoekwater wrote:

> But if it fails you will most likely end up with a stuck server.

There is --nonstopmode and "kill" ... ;)

I would do the test in a post-commit hook, that sends email when there is a
problem.

Cheers, Peter

-- 
Contact information: http://pmrb.free.fr/contact/


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06 11:51           ` Peter Münster
@ 2010-06-06 11:53             ` Taco Hoekwater
  0 siblings, 0 replies; 14+ messages in thread
From: Taco Hoekwater @ 2010-06-06 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Peter Münster wrote:
> On Sun, Jun 06 2010, Yury G. Kudryashov wrote:
> 
>> Probably, more features can be tested server-side analyzing the result pdf 
>> file using some library (though I don't know the pdf-parsing libraries 
>> sufficiently good to implement it).
> 
> Perhaps it's just sufficient to convert the pdf to an image, and compare it
> pixel by pixel. Then you can test nearly all automatically (hyperlinks will
> be difficult though).

This is already done by

   a) the contexttest project at supelec
      (although this is incomplete, iirc)
   b) the fontspec v2 package
      (but I don't know where the tests live)

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: ConTeXt unit testing
  2010-06-06 11:53             ` Peter Münster
@ 2010-06-06 11:54               ` Taco Hoekwater
  0 siblings, 0 replies; 14+ messages in thread
From: Taco Hoekwater @ 2010-06-06 11:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Peter Münster wrote:
> On Sun, Jun 06 2010, Taco Hoekwater wrote:
> 
>> But if it fails you will most likely end up with a stuck server.
> 
> There is --nonstopmode and "kill" ... ;)
> 
> I would do the test in a post-commit hook, that sends email when there is a
> problem.

Well, I would not object to such a service *existing*, but:

- not on one of my machines
- I don't want to be the maintainer either

Best wishes,
Taco
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2010-06-06 11:54 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-05 15:13 ConTeXt unit testing Yury G. Kudryashov
2010-06-05 15:43 ` Mojca Miklavec
2010-06-05 16:14   ` Otared Kavian
2010-06-05 19:05 ` luigi scarso
2010-06-06  8:51 ` Mojca Miklavec
2010-06-06  9:05   ` Taco Hoekwater
2010-06-06  9:14     ` Mojca Miklavec
2010-06-06 10:37       ` Taco Hoekwater
2010-06-06 11:12         ` Yury G. Kudryashov
2010-06-06 11:14           ` Taco Hoekwater
2010-06-06 11:53             ` Peter Münster
2010-06-06 11:54               ` Taco Hoekwater
2010-06-06 11:51           ` Peter Münster
2010-06-06 11:53             ` Taco Hoekwater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).