shithub: jbig2

Download patch

ref: d78f4fbaac91f43bd14ac7d54c60e8edb0fa5bfe
parent: cc3a563ea709064bf47147bd817a962e368a5c2a
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Tue May 17 20:42:24 EDT 2005

Attempt to hook the self tests into the scons build. This is supposed
to work with the development version, but does not.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@406 ded80894-8fb9-0310-811b-c03f3676ab4d

--- a/SConstruct
+++ b/SConstruct
@@ -29,3 +29,10 @@
         os_types.h config_types.h config_win32.h""")
 
 env.Program('jbig2dec', jbig2dec_sources, LIBS=['jbig2dec'], LIBPATH='.')
+
+# self tests
+test = env.Copy(CPPDEFINES = ['TEST', 'HAVE_STDINT_H'])
+test_sha1 = test.Program(test.Object('test_sha1', 'sha1.c'))
+test_alias = test.Alias('test', [test_sha1, 'test_jbig2dec.py', 'jbig2dec'])
+test.Command(test_alias, [], ["./test_jbig2dec.py", "./test_sha1"])
+test.AlwaysBuild('test')