Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Smith to handle dynamically generated test data #20

Open
jvgaultney opened this issue Mar 1, 2017 · 1 comment
Open

Change Smith to handle dynamically generated test data #20

jvgaultney opened this issue Mar 1, 2017 · 1 comment
Assignees

Comments

@jvgaultney
Copy link
Contributor

No description provided.

@bobh0303
Copy link
Contributor

Certain kinds of font testfiles are more easily and more accurately generated programmatically than by hand.

Examples (from Arabic projects) include: showing every character in the font in all relevant contextual forms (to test shaping logic) along with all combinations of features that affect any particular character (to test feature logic); showing representative diacritics on all possible bases and then all diacritics on representative bases (to test APs); etc.

Programs that generate such testfiles are dependent on a number of sources of data including the font(s) being tested, project-specific info about what characters are supposed to be in the font and what characters affected by what features, Unicode character properties (including those in the pipeline), etc.

Some of the dependencies are themselves products of the build process, and of course testfiles need to be regenerated when their dependencies have changed. An example from the wscript of the LateefGR project:

AUTOGEN_TESTS = ['Empty', 'AllChars', 'DiacTest1', 'Mirrored', 'SubtendingMarks', 'DaggerAlef', 'Kern' ]

for testname in AUTOGEN_TESTS:
	t = create(testname + '.ftml', cmd('perl ${SRC[0]} -t ' + testname + ' -f l -r local(Scheherazade) -r local(Lateef) -r url(LateefGR-Regular.woff) ${SRC[1]} ${SRC[2]}', ['tools/bin/absGenFTML', 'source/LateefReg.ttf', AP, 'tools/absGlyphList/absGlyphList.txt']))

While this works, the .FTML files are generated in the results folder. Currently, for smith to use such generated .FTML files for a test target, they have to be moved to tests folder, but that is really a violation of the separation of source and results.

One possible approach is for smith to put/copy all testfiles (including both static testfiles from source and dynamically generated testfiles) into a 'results/tests' folder.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants