fix font directory discovery in export_import_pngtest

the old way of constructing the font path from the openscad binary
has failed since the binary built outside testing has been used.
building the path from the test script works with any openscad binary.
This commit is contained in:
chrysn 2015-06-08 11:05:52 +02:00
parent 1b30f641ad
commit f85ace9dd0

View file

@ -116,7 +116,7 @@ if args.format != 'csg':
create_png_cmd = [args.openscad, newscadfile, '-o', pngfile] + remaining_args
print >> sys.stderr, 'Running OpenSCAD #2:'
print >> sys.stderr, ' '.join(create_png_cmd)
fontdir = os.path.join(os.path.dirname(args.openscad), "..", "testdata");
fontdir = os.path.join(os.path.dirname(__file__), "..", "testdata");
fontenv = os.environ.copy();
fontenv["OPENSCAD_FONT_PATH"] = fontdir;
result = subprocess.call(create_png_cmd, env = fontenv);