Ca va aider swilena a rester fonctionnelle un peu plus longtemps j'espère.
Index: ChangeLog from Nicolas Burrus burrus_n@lrde.epita.fr * configure.ac: Generate makefiles for swilena tests.
+2003-09-21 Nicolas Burrus burrus_n@lrde.epita.fr + * configure.ac: Add ruby support.
2003-09-15 Nicolas Burrus burrus_n@lrde.epita.fr Index: tools/swilena/ChangeLog from Nicolas Burrus burrus_n@lrde.epita.fr * expand.sh: Generate makefile.swig files instead of Makefile.am.
* python/Makefile: New file. * python/tests/Makefile.am: New file. * python/tests/simple1.py: New test.
* ruby/Makefile: New file. * ruby/tests/Makefile.am: New file. * ruby/tests/simple1.rb: New test.
+2003-09-21 Nicolas Burrus burrus_n@lrde.epita.fr + * meta/swilena_ntg_int_u.i: Fix type matching problems between templates and typedefs. * meta/swilena_ntg_int_s.i: Likewise. Index: configure.ac --- configure.ac Sun, 21 Sep 2003 20:25:01 +0200 burrus_n (oln/3_configure. 1.47.1.1.1.1.1.4.1.15.1.11 640) +++ configure.ac Sun, 21 Sep 2003 23:13:48 +0200 burrus_n (oln/3_configure. 1.47.1.1.1.1.1.4.1.15.1.12 640) @@ -360,7 +360,8 @@ [oln_cv_build_pylena], [the Python interface to Olena], [OLN_SWILENA], - [tools/swilena/python/Makefile], + [tools/swilena/python/Makefile + tools/swilena/python/tests/Makefile], [ AM_PATH_PYTHON([2.1]) save_CPPFLAGS=$CPPFLAGS @@ -383,7 +384,8 @@ [oln_cv_build_rblena], [the Ruby interface to Olena], [OLN_SWILENA], - [tools/swilena/ruby/Makefile], + [tools/swilena/ruby/Makefile + tools/swilena/ruby/tests/Makefile], [ AC_ARG_VAR([RUBY_CPPFLAGS], [Path to ruby.h]) AC_ARG_WITH([python-includedir], [Include path for ruby.h], Index: tools/swilena/expand.sh --- tools/swilena/expand.sh Sun, 21 Sep 2003 20:25:01 +0200 burrus_n (oln/s/25_expand.sh 1.7 750) +++ tools/swilena/expand.sh Sun, 21 Sep 2003 23:13:48 +0200 burrus_n (oln/s/25_expand.sh 1.8 750) @@ -113,7 +113,7 @@ cat <<EOF ## Process this file through Automake to produce Makefile.in -*- Makefile -*- ## -## Makefile.am for swilena/python +## Makefile.am for swilena/ruby ## NOTE: this file was generated automatically by expand.sh ##
@@ -197,9 +197,9 @@ ############ Output ###############
-header_src >"$SWILENA/src/Makefile.am" -dump_src >>"$SWILENA/src/Makefile.am" -header_python >"$SWILENA/python/Makefile.am" -dump_python >>"$SWILENA/python/Makefile.am" -header_ruby >"$SWILENA/ruby/Makefile.am" -dump_ruby >>"$SWILENA/ruby/Makefile.am" +header_src >"$SWILENA/src/makefile.swig" +dump_src >>"$SWILENA/src/makefile.swig" +header_python >"$SWILENA/python/makefile.swig" +dump_python >>"$SWILENA/python/makefile.swig" +header_ruby >"$SWILENA/ruby/makefile.swig" +dump_ruby >>"$SWILENA/ruby/makefile.swig" Index: tools/swilena/python/tests/Makefile.am --- tools/swilena/python/tests/Makefile.am Mon, 22 Sep 2003 00:50:52 +0200 burrus_n () +++ tools/swilena/python/tests/Makefile.am Sun, 21 Sep 2003 23:13:48 +0200 burrus_n (oln/v/15_Makefile.a 1.1 600) @@ -0,0 +1,10 @@ +## Process this file through Automake to produce Makefile.in -*- Makefile -*- +## +## Makefile.am for swilena/python/tests +## + +TESTS_ENVIRONMENT = \ + PYTHONPATH="$(PYTHONPATH):.." \ + IMGDIR="$(top_srcdir)/olena/img" + +TESTS = simple1.py Index: tools/swilena/python/tests/simple1.py --- tools/swilena/python/tests/simple1.py Mon, 22 Sep 2003 00:50:52 +0200 burrus_n () +++ tools/swilena/python/tests/simple1.py Sun, 21 Sep 2003 23:13:48 +0200 burrus_n (oln/v/16_simple1.py 1.1 700) @@ -0,0 +1,19 @@ +#!/usr/bin/env python + +import os +import sys +from swilena_image2d import * +from swilena_ntg_int_u import * + +imgdir = os.environ['IMGDIR'] + +lena = image2d_u8() +lena.load(imgdir + "/lena.pgm") +# FIXME: uncomment when ready +#assert(lena.has_impl()) + +lena.set(5, 5, int_u8(51)) +lena.ref(6, 6).value(42) + +assert(lena.at(5, 5).value() == 51) +assert(lena.at(6, 6).value() == 42) Index: tools/swilena/ruby/Makefile.am --- tools/swilena/ruby/Makefile.am Mon, 22 Sep 2003 00:50:52 +0200 burrus_n () +++ tools/swilena/ruby/Makefile.am Sun, 21 Sep 2003 23:13:48 +0200 burrus_n (oln/v/17_Makefile.a 1.1 600) @@ -0,0 +1,8 @@ +## Process this file through Automake to produce Makefile.in -*- Makefile -*- +## +## Makefile.am for swilena/python +## + +SUBDIRS = . tests + +include makefile.swig Index: tools/swilena/ruby/tests/Makefile.am --- tools/swilena/ruby/tests/Makefile.am Mon, 22 Sep 2003 00:50:52 +0200 burrus_n () +++ tools/swilena/ruby/tests/Makefile.am Sun, 21 Sep 2003 23:13:48 +0200 burrus_n (oln/v/18_Makefile.a 1.1 600) @@ -0,0 +1,10 @@ +## Process this file through Automake to produce Makefile.in -*- Makefile -*- +## +## Makefile.am for swilena/python/tests +## + +TESTS_ENVIRONMENT = \ + SWILENA_PATH=".." \ + IMGDIR="$(top_srcdir)/olena/img" + +TESTS = simple1.rb Index: tools/swilena/ruby/tests/simple1.rb --- tools/swilena/ruby/tests/simple1.rb Mon, 22 Sep 2003 00:50:52 +0200 burrus_n () +++ tools/swilena/ruby/tests/simple1.rb Sun, 21 Sep 2003 23:13:48 +0200 burrus_n (oln/v/19_simple1.rb 1.1 700) @@ -0,0 +1,23 @@ +#!/usr/bin/env ruby + +# Set swilena_path to the location where swilena ruby modules are +$: << ENV["SWILENA_PATH"] if ENV.has_key? "SWILENA_PATH" + +require "swilena_image2d" +require "swilena_ntg_int_u" + +include Swilena_ntg_int_u +include Swilena_image2d + +imgdir = ENV["IMGDIR"] + +lena = Image2d_u8.new +lena.load(imgdir + "/lena.pgm") +# FIXME: uncomment when ready +#exit 1 unless lena.has_impl() + +lena.set(5, 5, Int_u8.new(51)) +lena.ref(6, 6).value(42) + +exit 1 unless lena.at(5, 5).value() == 51 +exit 1 unless lena.at(6, 6).value() == 42