The Birdfont Source Code


All Repositories / birdfont.git / blob – RSS feed

fuzzbf.py in scripts

This file is a part of the Birdfont project.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git

Revisions

View the latest version of scripts/fuzzbf.py.
Redraw moving canvas and keep OTF feature tab open
1 #!/usr/bin/python3 2 3 import subprocess 4 from os import path 5 6 from run import run 7 8 def fuzz_import(): 9 fuzz_bf ('birdfont-test/testfont.bf') 10 11 def fuzz_bf (file): 12 run ("mkdir -p build/fuzz") 13 run ("mkdir -p build/fuzz/bugs") 14 run ("radamsa " + file + " > build/fuzz/font.bf") 15 16 cmd = "./birdfont-test.sh BF build/fuzz/font.bf" 17 print('Running: ' + cmd) 18 process = subprocess.Popen (cmd, shell=True) 19 process.communicate()[0] 20 if not process.returncode == 0: 21 print("Error: " + cmd) 22 print("A bug was found.") 23 24 i = 0 25 while path.isfile ('build/bugs/font_' + str(i) + '.bf'): 26 i = i + 1 27 28 run ('mv build/fuzz/font.bf attic/fuzz/bugs/font_' + str(i) + '.bf') 29 30 run ("rm -f build/fuzz/font.svg") 31 32 while True: 33 fuzz_import () 34