1 # Copyright (C) 2012 The Meme Factory, Inc. http://www.meme.com>/
3 # This file is part of GombeMI.
5 # GombeMI is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with GombeMI. If not, see <http://www.gnu.org/licenses/>.
20 # Karl O. Pinc <kop@meme.com>
22 # This just to test db operation, not creation etc.
24 include ../defaults.mk
29 # Trickery so we don't have to make load_file executable.
30 # (And don't use source (.) because posix won't let it take args.)
31 export RUN_TEST = sh <run_test.sh run_test.sh "$(PSQL_ARGS_MINIMAL)"
38 for f in $(TESTS) ; do \
39 $(RUN_TEST) test_$$(basename $$f) || e=1 ; \
41 $(MAKE) -s -f run_test.mkf reset 4>&2 || e=1 ; \
46 @$(MAKE) -s -f run_test.mkf reset 4>&2
48 .PHONY: $(load_targets) $(test_targets) $(save_targets) $(show_targets) \
49 $(trans_test_targets) $(trans_save_targets) $(trans_show_targets)
51 $(load_targets) $(test_targets) $(save_targets) $(show_targets) \
52 $(trans_test_targets) $(trans_save_targets) $(trans_show_targets):
57 @if [ ! -e sql/$(patsubst test_%,%,$@) ] ; then \
58 printf '$(patsubst test_%,%,$@): No such test\n' >&2 ; \