After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 650410 - Make test fails
Make test fails
Status: RESOLVED FIXED
Product: meld
Classification: Other
Component: general
git master
Other All
: Normal major
: ---
Assigned To: meld-maint
meld-maint
Depends on:
Blocks:
 
 
Reported: 2011-05-17 17:02 UTC by Davide
Modified: 2011-05-21 04:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Davide 2011-05-17 17:02:51 UTC
This is the error:

~/scratch/meld$ make test
./meld  ntest/file0{a,b}
/bin/sh: ./meld: Permission denied
make: *** [test] Error 126

Changing the Makefile taking into account the proper path, fix the error, but doesn't show anything useful:

~/scratch/meld$ git diff Makefile
diff --git a/Makefile b/Makefile
index 7785419..88dc986 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@ include INSTALL
 #
 VERSION := $(shell grep "^version" meld/meldapp.py | cut -d \"  -f 2)
 RELEASE := meld-$(VERSION)
-MELD_CMD := ./meld #--profile
+MELD_CMD := ./bin/meld #--profile
 TESTNUM := 1
 DEVELOPER := 0
 SPECIALS := bin/meld meld/paths.py

~/scratch/meld$ make test
./bin/meld  ntest/file0{a,b}
./bin/meld  ntest/file5{a,b,c}
./bin/meld  ntest/{1,2}
./bin/meld  ntest/{1,2,3}

In fact, there isn't any ntest directory, probably left behind from SVN-to-GIT migration or somewhere else in the meld's history:

~/scratch/meld$ find . -name *ntest*
~/scratch/meld$ 

I'm marking this as major, since I think it is. Not for users, of course, but for developers who want to contribute to meld and be sure they don't break the existing features with their patches (of course I'm one of them)
Comment 1 Kai Willadsen 2011-05-18 22:05:22 UTC
Yeah... we don't have tests. I'd love it if we did, but it's just not something that exists right now. As such the 'fix for this bug is to remove all of the test target and associated cruft from the Makefile.

If we were to try to get a test suite up, it would have to go component by component; this will be a big task.
Comment 2 Davide 2011-05-20 22:25:18 UTC
Ok, I understand the problem.
However, a ugly but effective end-to-end tests to begin with could be just to have a few (or even several) text files and the corresponding PNG screenshots of what the expected diff should look like. Yes, it will break easily with irrelevant changes to the interface, but if we separate changes to the interfaces from changes to the diff algorithms they still can be useful (and quick to do).

Thanks for considering this suggestion.
Davide
Comment 3 Kai Willadsen 2011-05-21 03:43:04 UTC
As usual, if you want to provide a patch, that would be great.

For what it's worth, if we were to start systematically adding tests to Meld, the first focus would be on the version control backends. The diff code and the interface code tends to be relatively stable; the version control code is very fragile.

Having said that, if you were interested in looking at tests for the diff algorithms, the most important place to start would be to come up with a range of test cases covering the different types of diff chunk, and the different ways we display them. I think relying on the actual rendering is probably not that important.
Comment 4 Kai Willadsen 2011-05-21 04:50:41 UTC
I've just pushed a patch to head that removes the test targets and associated gunk from the Makefile, so I'm closing this bug. However, if you'd like to open a new bug (or bugs) for tests in specific bits of Meld, please feel free to do so.