Debian Codegraph @

ruby/test/Makefile.am

raw
1 # -*- Mode: Makefile -*-
2 #
3 # Makefile.am - automake file for Ruby tests for Redland
4 #
5 # Copyright (C) 2004-2005 David Beckett - http://www.dajobe.org/
6 # Copyright (C) 2004-2005 University of Bristol - http://www.bristol.ac.uk/
7 #
8 # This package is Free Software and part of Redland http://librdf.org/
9 #
10 # It is licensed under the following three licenses as alternatives:
11 # 1. GNU Lesser General Public License (LGPL) V2.1 or any newer version
12 # 2. GNU General Public License (GPL) V2 or any newer version
13 # 3. Apache License, V2.0 or any newer version
14 #
15 # You may not use this file except in compliance with at least one of
16 # the above three licenses.
17 #
18 # See LICENSE.html or LICENSE.txt at the top of this package for the
19 # full license terms.
20 #
21
22 RUBY_PACKAGE=@RUBY_PACKAGE@
23
24 RUBY_TEST_FILES=\
25 test_model.rb test_node.rb test_parser.rb test_rdf.rb \
26 test_rdfs_resource.rb test_resource.rb test_serializer.rb \
27 test_statement.rb test_store.rb test_uri.rb test_query.rb
28
29 EXTRA_DIST=\
30 $(RUBY_TEST_FILES) README ical.rdf triples.rdf one.nt
31
32
33 CLEANFILES=\
34 *.db out*.rdf
35
36 check-local: check-ruby
37
38 check-ruby: ../$(RUBY_PACKAGE)-stamp $(RUBY_TEST_FILES)
39 @result=0; fails=; \
40 $(ECHO) "Testing Ruby"; \
41 for test in $(RUBY_TEST_FILES); do \
42 $(ECHO) $(ECHO_N) "Checking $$test $(ECHO_C)"; \
43 arg="-I.. -I../lib"; \
44 $(RUBY) $$arg $(srcdir)/$$test; \
45 status=$$?; \
46 if test $$status != 0 -a $$status != 2 ; then \
47 $(ECHO) FAILED returned status $$status; result=1; \
48 echo $(RUBY) $$arg $(srcdir)/$$test; \
49 fails="$$fails $$test"; \
50 else \
51 $(ECHO) "ok"; \
52 fi; \
53 done; \
54 if test $$result = 1 ; then \
55 echo "FAILED tests:$$fails"; \
56 fi; \
57 exit $$result
58
59 ../$(RUBY_PACKAGE)-stamp:
60 cd .. && $(MAKE) $(RUBY_PACKAGE)-stamp