diff options
author | chrysn <chrysn@fsfe.org> | 2013-06-28 09:47:17 (GMT) |
---|---|---|
committer | chrysn <chrysn@fsfe.org> | 2013-06-28 09:47:17 (GMT) |
commit | 4d18db65e3d1f31057012bd53c57ce51ad6417dd (patch) | |
tree | 7fd420bccad4235f881ded0ee35081a7481b066f /tests/cgalstlsanitytest | |
parent | 28e420d8712a73e66db328cdb80a8b09f6f9a0b4 (diff) |
python validation for cgal stl sanity test
this drops another static binary and replaces it with a very small
shell^Wpython script (again, python used to avoid sed / grep
implementation differences)
Diffstat (limited to 'tests/cgalstlsanitytest')
-rwxr-xr-x | tests/cgalstlsanitytest | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/cgalstlsanitytest b/tests/cgalstlsanitytest new file mode 100755 index 0000000..0ec9ef4 --- /dev/null +++ b/tests/cgalstlsanitytest @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +import re, sys, subprocess, os + +stlfile = sys.argv[3] + '.stl' + +subprocess.check_call([sys.argv[2], sys.argv[1], '-o', stlfile]) + +result = open(stlfile).read() + +os.unlink(stlfile) + +if 'nan' in result or 'inf' in result: + sys.exit(1) + +open(sys.argv[3], 'w').write('') # this check only works on return values |