On Wed, 2014-06-25 at 09:42 +0200, Éloi Rivard wrote: > Another clue is that denemo automatically reopens the last file used, > that may fail to generate a thumbnail. Any test harness should remove (or re-write) the ~/.denemo-xxx directory so that the environment at start of test are independent of the sequence of testing.
As special processing takes place when denemo is invoked with no ~/.denemo-xxx directory, it is probably best to create a standardized version of this directory for most tests (only for testing what happens when it doesn't exist should it be absent). Richard > > > 2014-06-25 9:28 GMT+02:00 Richard Shann <[email protected]>: > I configured with --enable-debug and did make > and then > cd tests && gtester -p=/unit/thumbnailer unit && cd .. > > and this completed successfully, the tail of the output is > below. > So it would seem that this test is faulty - sometimes it > passes and > sometimes not. I can see a potential problem with it - the > command > (d-CreateThumbnail #f) is perhaps the one that creates a > LilyPond > process without waiting for it to finish (when exiting denemo > this is > what happens I think). If the test is looking for the output > file from > the LilyPond process then that may not have finished by the > time the > test checks. Just a thought. > > Richard > > > [...] > Denemo - DEBUG : Executing '(d-CreateThumbnail #f > "/home/rshann/git-denemo/denemo/tests/tmp/thumbnail.png")(d-Exit)' > Denemo - INFO : Creating > thumbnail /home/rshann/git-denemo/denemo/tests/tmp/thumbnail.png > Denemo - DEBUG : > Generating /tmp/Denemo9Sr0Ug/denemothumb.png from > Lilypond > PASS: unit > > > > > On Wed, 2014-06-25 at 00:16 +0200, Éloi Rivard wrote: > > Ok, you should be able to launch the failing test with : > > > > cd tests > > gtester -p=/unit/thumbnailer unit > > You should probably configure with --enable-debug to see > debug > > messages, if you did not > > > > > Denemo - CRITICAL: Thumbnail 128x128 > > file /tmp/Denemo2g5UiI/denemothumb. > > png gave an error: Failed to open file > > '/tmp/Denemo2g5UiI/denemothumb.png': No such file or > directory > > > Denemo - CRITICAL: Thumbnail 256x256 > > file /tmp/Denemo2g5UiI/denemothumb.png gave an error: Failed > to open > > file '/tmp/Denemo2g5UiI/denemothumb.png': No such file or > directory > > > > > > Those two error messages you get seem to come from > thumb_finished in > > printview/printview.c, because the create_thumbnail did not > ran > > properly… > > > > > > > > > > > > 2014-06-16 19:06 GMT+02:00 Richard Shann > <[email protected]>: > > gtester --version > > gtester version 2.32.4 > > > > > > On Mon, 2014-06-16 at 17:46 +0200, Éloi Rivard > wrote: > > > What is you gtester version ? > > > gtester --version > > > > > > > > > > > > 2014-06-16 17:00 GMT+02:00 Richard Shann > > <[email protected]>: > > > On Mon, 2014-06-16 at 15:15 +0200, Éloi > Rivard > > wrote: > > > > Logs are in the "tests" dir. There are > several > > ones > > > (integration.log > > > > for integration test, unit.log for unit > test etc.) > > > > > > I have nothing that looks like a log file > in the > > tests > > > directory after > > > running the tests as I described: > > > ls -lrt > > > total 304 > > > drwxr-xr-x 2 denemo-user denemo-user 4096 > Jun 16 > > 07:14 > > > integration-tmp > > > drwxr-xr-x 4 denemo-user denemo-user 4096 > Jun 16 > > 07:25 > > > Interactive > > > -rw-r--r-- 1 denemo-user denemo-user 949 > Jun 16 > > 07:25 > > > README.md > > > -rw-r--r-- 1 denemo-user denemo-user 316 > Jun 16 > > 07:25 > > > Makefile.am > > > -rw-r--r-- 1 denemo-user denemo-user 302 > Jun 16 > > 07:25 > > > common.h > > > -rw-r--r-- 1 denemo-user denemo-user 779 > Jun 16 > > 07:25 > > > common.c > > > -rw-r--r-- 1 denemo-user denemo-user 4502 > Jun 16 > > 07:25 unit.c > > > -rw-r--r-- 1 denemo-user denemo-user 8211 > Jun 16 > > 07:25 > > > integration.c > > > drwxr-xr-x 5 denemo-user denemo-user 4096 > Jun 16 > > 07:25 > > > fixtures > > > -rw-r--r-- 1 denemo-user denemo-user 40068 > Jun 16 > > 08:37 > > > Makefile.in > > > -rw-r--r-- 1 denemo-user denemo-user 42423 > Jun 16 > > 08:37 > > > Makefile > > > -rw-r--r-- 1 denemo-user denemo-user 53856 > Jun 16 > > 08:38 > > > integration.o > > > -rw-r--r-- 1 denemo-user denemo-user 9992 > Jun 16 > > 08:38 > > > common.o > > > -rwxr-xr-x 1 denemo-user denemo-user 37567 > Jun 16 > > 08:38 > > > integration > > > -rw-r--r-- 1 denemo-user denemo-user 29888 > Jun 16 > > 08:38 unit.o > > > -rwxr-xr-x 1 denemo-user denemo-user 28066 > Jun 16 > > 08:38 unit > > > drwxr-xr-x 2 denemo-user denemo-user 4096 > Jun 16 > > 08:38 tmp > > > > > > Richard > > > > > > > > > > > > > > > 2014-06-16 15:14 GMT+02:00 Éloi Rivard > > <[email protected]>: > > > > Ok it seems that you have an > issue with > > the > > > thumbnailer test, > > > > I look at this asap. > > > > > > > > > > > > > > > > 2014-06-16 12:05 GMT+02:00 > Richard Shann > > > > <[email protected]>: > > > > > > > > On Sun, 2014-06-15 at > 12:53 +0200, > > Éloi > > > Rivard wrote: > > > > > Do you think the > testsuite is > > tough enough > > > to merge > > > > the "refactor" > > > > > branch now ? > > > > > > > > > > > > We seem to be so close, > ready to > > write at > > > least one or > > > > two tests, but I > > > > can't get make -C tests > check to > > work (see > > > below). > > > > Also, you said > > > > > > > > > > I create a > new test > > that will > > > try to > > > > execute every not > > > > > builtin scheme > > > > > > command > > > > > > > > > > > > is this actually > happening?, and > > if so does > > > it execute > > > > the command on > > > > blank file (very weak) > rather than > > a file > > > with music > > > > in it - that would > > > > be a small change that > would make > > the test > > > far > > > > stronger... > > > > I started trying to > create a test > > for each > > > new > > > > command, but I don't > have > > > > a method for creating > tests that > > work. > > > > To run the tests I have > a separate > > user with > > > user name > > > > "denemo-user". I > > > > don't see any log file > at the end > > of the > > > tests or > > > > details of what > > > > failed, I'll paste here > what I see > > - it ends > > > with 1 of > > > > 2 tests fail. > > > > This is the result of: > > > > su denemo-user > > > > git pull > > > > make clean > > > > make distclean > > > > ./autogen.sh > > > > make && make -C tests > check > > > > [...] > > > > > > > > > Denemo - MESSAGE : > Opening > > > > > > > > > > file /home/denemo-user/denemo-git/tests/tmp/scm/SanityCheck.denemo > > > > > OK > > > > > PASS: integration > > > > > /unit/run-and-quit: > Denemo - > > MESSAGE : > > > Loading > > > > preference > > > > > > > > file: /home/denemo-user/.denemo-1.1.7/denemorc > > > > > Denemo - MESSAGE : > Denemo > > version 1.1.7 > > > > > Denemo - MESSAGE : > Loaded > > > > > > > > > > keymap /home/denemo-user/denemo-git/actions/Default.commands > > > > > OK > > > > > /unit/scheme-log: > Denemo - > > WARNING : This > > > is warning > > > > > Denemo - CRITICAL: > This is > > critical > > > > > Denemo - MESSAGE : > Loading > > preference > > > > > > > > file: /home/denemo-user/.denemo-1.1.7/denemorc > > > > > Denemo - MESSAGE : > Denemo > > version 1.1.7 > > > > > Denemo - MESSAGE : > Loaded > > > > > > > > > > keymap /home/denemo-user/denemo-git/actions/Default.commands > > > > > Denemo - INFO : > This is info > > > > > Denemo - MESSAGE : > This is > > message > > > > > OK > > > > > > /unit/scheme-log-error: Denemo - > > MESSAGE : > > > Loading > > > > preference > > > > > > > > file: /home/denemo-user/.denemo-1.1.7/denemorc > > > > > Denemo - MESSAGE : > Denemo > > version 1.1.7 > > > > > Denemo - MESSAGE : > Loaded > > > > > > > > > > keymap /home/denemo-user/denemo-git/actions/Default.commands > > > > > Denemo - ERROR : > This error is > > fatal > > > > > OK > > > > > /unit/thumbnailer: > Running > > scheme: > > > > (d-CreateThumbnail #f > > > > > > > > > > "/home/denemo-user/denemo-git/tests/tmp/thumbnail.png")(d-Exit) > /home/denemo-user/denemo-git/tests/fixtures/denemo/blank.denemo > > > > > Denemo - MESSAGE : > Loading > > preference > > > > > > > > file: /home/denemo-user/.denemo-1.1.7/denemorc > > > > > Denemo - MESSAGE : > Denemo > > version 1.1.7 > > > > > Denemo - MESSAGE : > Loaded > > > > > > > > > > keymap /home/denemo-user/denemo-git/actions/Default.commands > > > > > Success 1 > > > > > Denemo - CRITICAL: > Thumbnail > > 128x128 > > > > > > file /tmp/Denemo2g5UiI/denemothumb.png gave > > > an error: > > > > Failed to open file > > > > > > '/tmp/Denemo2g5UiI/denemothumb.png': No such > > > file or > > > > directory > > > > > Denemo - CRITICAL: > Thumbnail > > 256x256 > > > > > > file /tmp/Denemo2g5UiI/denemothumb.png gave > > > an error: > > > > Failed to open file > > > > > > '/tmp/Denemo2g5UiI/denemothumb.png': No such > > > file or > > > > directory > > > > > Denemo - MESSAGE : > Opening > > > > > > > > > > file /home/denemo-user/denemo-git/tests/fixtures/denemo/blank.denemo > > > > > Denemo - INFO : > Creating > > > > > > > > > > thumbnail /home/denemo-user/denemo-git/tests/tmp/thumbnail.png > > > > > ** > > > > > > > ERROR:unit.c:121:test_thumbnailer: > > > assertion failed: > > > > (g_file_test(thumbnail, > > G_FILE_TEST_EXISTS)) > > > > > /bin/bash: line 5: > 1553 Aborted > > > > > > > > G_TEST_SRCDIR="/home/denemo-user/denemo-git/tests" > > > > > > > > G_TEST_BUILDDIR="/home/denemo-user/denemo-git/tests" > > > > G_DEBUG=gc-friendly > > MALLOC_CHECK_=2 > > > MALLOC_PERTURB_= > > > > $((${RANDOM:-256} % > 256)) > > ${dir}$tst > > > > > FAIL: unit > > > > > > > ===================================== > > > > > 1 of 2 tests failed > > > > > Please report to > > [email protected] > > > > > > > ===================================== > > > > > make[2]: *** > [check-TESTS] Error > > 1 > > > > > make[2]: Leaving > directory > > > > > > `/home/denemo-user/denemo-git/tests' > > > > > make[1]: *** > [check-am] Error 2 > > > > > make[1]: Leaving > directory > > > > > > `/home/denemo-user/denemo-git/tests' > > > > > make: *** [check] > Error 2 > > > > > make: Leaving > directory > > > > > > `/home/denemo-user/denemo-git/tests' > > > > > > > denemo-user@DebianBox:~/denemo-git$ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > The test > parses the > > action > > > directory to > > > > find the scheme > > > > > commands. > > > > > > > > > > > > For each > command, it > > checks if > > > an > > > > associated test file > > > > > exists, lets > > > > > > say > > > tests/fixtures/scheme/THECOMMAND.scm. > > > > If so it executes > > > > > it. > > > > > > > > > > Is that to say > it > > executes the > > > script > > > > starting with a blank > > > > > score? Does > > > > > it then save > the score > > after the > > > script has > > > > executed and test > > > > > against > > > > > > THECOMMAND.denemo ? > > > > > this would > sound like a > > good > > > framework for > > > > testing. > > > > > > > > > > > > > > > > If not it > just > > executes > > > > > "(d-THECOMMAND)(d-quit)". > > > > > > > > > > > > This would > be a weak > > test in > > > that case, > > > > > > > > > > It could be > made quite a > > bit > > > stronger by > > > > making the > > > > > environment in > which > > > > > (d-THECOMMAND) > is > > executed a more > > > typical > > > > environment, by > > > > > installing a > > > > > couple of > staffs and > > some chords, > > > leaving > > > > the cursor on a > > > > > chord. Many > > > > > more commands > do useful > > things > > > when the > > > > cursor is on something > > > > > and when > > > > > other staffs > are present > > than do > > > something > > > > useful in a > > > > > completely > empty > > > > > score. > > > > > > > > > > (d-AddAfter) > > > > > (d-A) > > > > > (d-CursorUp) > > > > > (d-CursorUp) > > > > > > (d-AddNoteToChord) > > > > > > (d-MoveCursorLeft) > > > > > (d-THECOMMAND) > > > > > (d-Save > > "filename= ....") > > > > > (d-Quit) > > > > > > > > > > would generate > a > > distinctive > > > output file for > > > > many commands (it > > > > > creates > > > > > two staffs, > populates > > one and then > > > executes > > > > THECOMMAND in that > > > > > situation). > > > > > > > > > > > but it > could at least > > check > > > that the > > > > command does not > > > > > provoke a > > > > > > segfault. > > > > > > > > > > > > > > > > > > > > > > > Then the > test could be > > a bit > > > tougher. For > > > > example, we could > > > > > decide > > > > > > that if a > scheme > > command return > > > FALSE, it > > > > makes the test > > > > > fail. > > > > > > > > > > I'm not sure > that Denemo > > commands > > > return > > > > anything useful. But > > > > > detecting > > > > > scheme > exceptions would > > be good - > > > we could > > > > exit in the trap > > > > > handler if > > > > > noninteractive > was set. > > We might > > > have to fix > > > > one or two > > > > > commands that > > > > > don't expect > to be > > executed in the > > > given > > > > environment - well, > > > > > we could > > > > > just write a > test for > > them. > > > > > > > > > > > > What do you > think ? > > > > > > > > > > > > > > > I think this > is > > excellent - it > > > will require > > > > a rule to generate > > > > > the set > > > > > of expected > output > > files, rather > > > than diff > > > > them (for the > > > > > initial > > > > > creation of > the expected > > output), > > > and one to > > > > accept an altered > > > > > set of > > > > > files (copying > them to > > the > > > expected ones) > > > > would be a > > > > > time-saver > too. > > > > > After a change > of > > version in the > > > Denemo file > > > > format all the > > > > > expected > > > > > output files > would > > change - you > > > would make > > > > just this change, > > > > > check a few > > > > > examples and > then run > > the rule to > > > overwrite > > > > all the old > > > > > versions with > > > > > the new ones. > > > > > > > > > > Richard > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > 2014-04-15 > 21:10 GMT > > +02:00 > > > Richard Shann > > > > > > > <[email protected]>: > > > > > > On > Tue, > > 2014-04-15 at > > > 19:13 +0100, > > > > Richard Shann > > > > > wrote: > > > > > > > As > you > > remarked, it > > > will be good > > > > to generate a > > > > > new .scm > > > > > > > script each > > > > > > > > time > > > > > > > a > new > > command is made > > > > > > > > > > > > This > script > > could assume > > > that a > > > > variable, > > > > > > > > Denemo-output-filename > > > say, > > > > > > was > defined > > which it > > > should use > > > > via > > > > > > > > > > > > > (d-Save > > > Denemo-output-filename) > > > > > > > (d-Quit) > > > > > > > > > > > > at > the end of > > the test. > > > (I think I > > > > missed the > > > > > (d-Quit) out > of > > > > > > the > > > > > > > current > > script ...) > > > > > > > > Richard > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > > Éloi Rivard - [email protected] > > > > > > > > « On perd plus à être indécis > qu'à se > > tromper. » > > > > > > > > > > > > > > > > > > > > -- > > > > Éloi Rivard - [email protected] > > > > > > > > « On perd plus à être indécis qu'à se > tromper. » > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Éloi Rivard - [email protected] > > > > > > « On perd plus à être indécis qu'à se tromper. » > > > > > > > > > > > > > > > > > -- > > Éloi Rivard - [email protected] > > > > « On perd plus à être indécis qu'à se tromper. » > > > > > > > > > -- > Éloi Rivard - [email protected] > > « On perd plus à être indécis qu'à se tromper. » > _______________________________________________ Denemo-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/denemo-devel
