Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 362557 - app-text/libspectre FEATURES=test doesn't actually test anything
Summary: app-text/libspectre FEATURES=test doesn't actually test anything
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-08 01:27 UTC by Mart Raudsepp
Modified: 2011-05-14 12:49 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mart Raudsepp gentoo-dev 2011-04-08 01:27:29 UTC
As also referenced ages ago on http://bugs.gentoo.org/show_bug.cgi?id=218417#c2 - FEATURES=test doesn't actually test anything. It only compiles the test programs - the end. So FEATURES=test is quite misleading for it. Please either kill it and the associated extra deps, or make it actually test something, such as getting a canonical postscript file and run the tests on it in src_test phase.
Comment 1 Mart Raudsepp gentoo-dev 2011-04-08 01:53:47 UTC
To test need a sensible postscript test file then, and run the tests on it manually after creating result dirs. I tested on a huge xlib.ps file (335 pages) that I found on my machine (probably too big for a good enough test, also only portrait mode pages, no rotation, etc, that is - not a good test), like so:

cd test/
mkdir parser-result
mkdir spectre-result
./parser-test /home/leio/xlib.ps parser-result
./spectre-test /home/leio/xlib.ps spectre-result

parser-test will have various txt files in it.
spectre-test should have png renderings of each document page, and some other tests, like PDF result, some sort of reduced page count postscript file, rotated stuff and more.


The latter crashes because it has an assert case in it, which is supposed to crash in a release build (the build we want), so need to also patch this line out of test/spectre-test.c:

spectre_document_load (NULL, argv[1]);


I have no idea if it actually will ever fail though, unless it crashes along the way. It spits out various non-fatal errors for me, but returns with success code. Maybe that's fine and they are errors in the postscript file I use, rather than in the library.
Would be nice if upstream would make it more automated. Have results to compare the results of a certain test file to, etc.
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2011-05-14 12:49:09 UTC
Tests disabled, as they dont test anything