1#
2# Sets up some regression applications
3# Runs regression tests
4#
5# To run this, at least the basic build / development environment must
6# be installed (gcc, ...)
7#
8XEN_ROOT=$(PWD)/../../..
9REG_TEST_DIR=$(PWD)
10
11PYTHON_VERSIONS=python-2.3 python-2.4 python-2.5 python-2.6 python-3.1
12
13.PHONY: all
14all: check-python-syntax
15
16.PHONY: check-python-syntax
17check-python-syntax: runtime-environment
18	@(set -e && for p in $(PYTHON_VERSIONS); do \
19	  /bin/sh $(REG_TEST_DIR)/scripts/check_python_syntax.sh \
20		$(REG_TEST_DIR) $$p $(XEN_ROOT); done)
21
22.PHONY: runtime-environment
23runtime-environment: $(PYTHON_VERSIONS)
24
25.PHONY: distclean
26distclean:
27	rm -fr $(REG_TEST_DIR)/installed $(REG_TEST_DIR)/downloads \
28		$(REG_TEST_DIR)/build
29
30### Python 2.3
31
32.PHONY: python-2.3
33python-2.3: $(REG_TEST_DIR)/installed/python-2.3/bin/python2.3
34
35$(REG_TEST_DIR)/installed/python-2.3/bin/python2.3: \
36	$(REG_TEST_DIR)/downloads/Python-2.3.7.tgz
37	@/bin/sh $(REG_TEST_DIR)/scripts/build_python.sh \
38		$(REG_TEST_DIR) 2.3 2.3.7
39$(REG_TEST_DIR)/downloads/Python-2.3.7.tgz:
40	@/bin/sh $(REG_TEST_DIR)/scripts/download_python.sh \
41		$(REG_TEST_DIR) 2.3.7
42
43### Python 2.4
44
45.PHONY: python-2.4
46python-2.4: $(REG_TEST_DIR)/installed/python-2.4/bin/python2.4
47
48$(REG_TEST_DIR)/installed/python-2.4/bin/python2.4: \
49	$(REG_TEST_DIR)/downloads/Python-2.4.6.tgz
50	@/bin/sh $(REG_TEST_DIR)/scripts/build_python.sh \
51		$(REG_TEST_DIR) 2.4 2.4.6
52$(REG_TEST_DIR)/downloads/Python-2.4.6.tgz:
53	@/bin/sh $(REG_TEST_DIR)/scripts/download_python.sh \
54		$(REG_TEST_DIR) 2.4.6
55
56### Python 2.5
57
58.PHONY: python-2.5
59python-2.5: $(REG_TEST_DIR)/installed/python-2.5/bin/python2.5
60
61$(REG_TEST_DIR)/installed/python-2.5/bin/python2.5: \
62	$(REG_TEST_DIR)/downloads/Python-2.5.4.tgz
63	@/bin/sh $(REG_TEST_DIR)/scripts/build_python.sh \
64		$(REG_TEST_DIR) 2.5 2.5.4
65$(REG_TEST_DIR)/downloads/Python-2.5.4.tgz:
66	@/bin/sh $(REG_TEST_DIR)/scripts/download_python.sh \
67		$(REG_TEST_DIR) 2.5.4
68
69### Python 2.6
70
71.PHONY: python-2.6
72python-2.6: $(REG_TEST_DIR)/installed/python-2.6/bin/python2.6
73
74$(REG_TEST_DIR)/installed/python-2.6/bin/python2.6: \
75	$(REG_TEST_DIR)/downloads/Python-2.6.2.tgz
76	@/bin/sh $(REG_TEST_DIR)/scripts/build_python.sh \
77		$(REG_TEST_DIR) 2.6 2.6.2
78$(REG_TEST_DIR)/downloads/Python-2.6.2.tgz:
79	@/bin/sh $(REG_TEST_DIR)/scripts/download_python.sh \
80		$(REG_TEST_DIR) 2.6.2
81
82### Python 3.0.1 has reached end of life and is not (longer) supported
83
84### Python 3.1
85
86.PHONY: python-3.1
87python-3.1: $(REG_TEST_DIR)/installed/python-3.1/bin/python3.1
88
89$(REG_TEST_DIR)/installed/python-3.1/bin/python3.1: \
90	$(REG_TEST_DIR)/downloads/Python-3.1.tgz
91	@/bin/sh $(REG_TEST_DIR)/scripts/build_python.sh \
92		$(REG_TEST_DIR) 3.1 3.1
93$(REG_TEST_DIR)/downloads/Python-3.1.tgz:
94	@/bin/sh $(REG_TEST_DIR)/scripts/download_python.sh \
95		$(REG_TEST_DIR) 3.1
96