-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
Makefile.in
87 lines (72 loc) · 2.2 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#######################################################################
# Makefile for scilab test-suite
#######################################################################
LANGUAGE = scilab
SCILAB = @SCILAB@
SCILAB_OPT = @SCILABOPT@
SCRIPTSUFFIX = _runme.sci
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
top_builddir = ../@top_builddir@
C_TEST_CASES += \
scilab_consts \
scilab_enums \
CPP_TEST_CASES += \
inout \
primitive_types \
scilab_li_matrix \
scilab_multivalue \
scilab_pointer_conversion_functions \
CPP_STD_TEST_CASES += \
li_std_container_typemaps \
include $(srcdir)/../common.mk
# Overriden variables
SRCDIR = ../$(srcdir)/
INCLUDES = $(abspath $(srcdir)/..)
# Local variables
TEST_DIR = $*.dir
RUNME_SCRIPT = $(TEST_DIR)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
SRC_RUNME_SCRIPT = $(srcdir)/$(SCRIPTPREFIX)$*$(SCRIPTSUFFIX)
# Rules for the different types of tests
%.cpptest:
$(setup)
+(cd $(TEST_DIR) && $(swig_and_compile_cpp))
cd $(TEST_DIR) && $(run_testcase)
%.ctest:
$(setup)
+(cd $(TEST_DIR) && $(swig_and_compile_c))
cd $(TEST_DIR) && $(run_testcase)
%.multicpptest:
$(setup)
+(cd $(TEST_DIR) && $(swig_and_compile_multi_cpp))
cd $(TEST_DIR) && $(run_testcase)
# Logs the test case execution
# Copies files and creates directories needed for the test case
setup = \
if [ ! -d $(TEST_DIR) ]; then \
mkdir $(TEST_DIR); \
fi; \
if [ -f $(SRC_RUNME_SCRIPT) ]; then \
echo "$(ACTION)ing testcase $* (with run test) under $(LANGUAGE)" ; \
if [ ! -f $(TEST_DIR) ]; then \
cp $(SRC_RUNME_SCRIPT) $(TEST_DIR); \
fi; \
if [ ! -f $(TEST_DIR)/swigtest.start ]; then \
cp $(srcdir)/swigtest.start $(TEST_DIR); \
fi; \
if [ ! -f $(TEST_DIR)/swigtest.quit ]; then \
cp $(srcdir)/swigtest.quit $(TEST_DIR); \
fi; \
else \
echo "$(ACTION)ing testcase $* under $(LANGUAGE)" ; \
fi; \
# Runs the testcase. A testcase is only run if
# a file is found which has _runme.sci appended after the testcase name.
run_testcase = \
if [ -f $(RUNME_SCRIPT) ]; then ( \
env LD_LIBRARY_PATH=$(srcdir)/$(TEST_DIR):$$LD_LIBRARY_PATH $(RUNTOOL) $(SCILAB) $(SCILAB_OPT) -f $(RUNME_SCRIPT); )\
fi
# Clean: remove the generated files
%.clean:
@rm -rf $(TEST_DIR)
clean: