forked from MethodicalAcceleratorDesign/MAD-X
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile_test
200 lines (182 loc) · 8.15 KB
/
Makefile_test
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# |
# o---------------------------------------------------------------------o
# |
# | MAD makefile - Tests
# |
# o---------------------------------------------------------------------o
# |
# | Methodical Accelerator Design
# |
# | Copyright (c) 2011+ CERN, [email protected]
# |
# | For more information, see http://cern.ch/mad
# |
# o---------------------------------------------------------------------o
# |
# | $Id$
# |
# 2014-May-23 14:51:22 ghislain:
# reinstated test-ptc-twiss that had disappeared from this file
# merged test-twiss-7 with test-emit-2 and suppressed test-emit-2
# 2014-Aug-18 16:09:41 ghislain:
# added test-line testsuite with
# tests : runs tests-all not in tests-long first test for repetition count
# for element vs line
#
# 2015-Apr-01 17:47:56 ghislain:
# added shrink tests in test-setvars_lin and renamed to test-table
# 2016-Jun-16 14:25:56 Irina:
# added test-twiss-12 for sigma matrix calculation
# 2021-Sep-02 20:59:00 ghislain:
# added test-taper
# 2022-Jul-06 jsberg-bnl:
# added test comparing PTC to TWISS/TRACK for [XY]ROTATION
# 2022-Jun-21 jsberg-bnl:
# added test-twiss-16 for exact TWISS drift compared to PTC
# testsuite
# variables:
# tests-all : contains all tests (includes tests-long)
# tests-long : contains all long tests (overlaps tests-all)
# rules (commands):
# tests : runs tests-all not in tests-long
# tests-all : runs tests-all
# tests order
tests-all = \
test-table test-table-2 \
test-memory test-control \
\
test-makethin test-makethin-2 test-makethin-3 test-makethin-4 \
test-elseparator\
test-survey test-survey-2 test-survey-3 test-survey-4 \
test-taper \
test-track test-track-2 test-track-3 test-track-4 test-track-5 test-track-6 \
test-track-7 test-track-8 test-track-9 test-track-10 test-track-11 test-track-12 test-track-13 test-track-14 \
test-track-acd test-track-rotations test-beambeam-npart \
test-twiss test-twiss-2 test-twiss-3 test-twiss-4 test-twiss-5 \
test-twiss-6 test-twiss-8 test-twiss-9 test-twiss-10 test-twiss-11 \
test-twiss-12 test-twiss-13 test-twiss-14 test-twiss-15 test-twiss-16 test-twiss-17 \
test-twiss-exact test-translation test-translation-2 test-crabcavity \
test-xrotation test-yrotation test-rotations test-rotations-2 test-interpolate test-rf-fringe \
test-cororbit test-cororbit-2 test-cororbit-3 test-cororbit-4 \
test-emit test-emit-2 \
test-ibs test-ibs-2 test-ibs-3 test-ibs-4 \
test-error test-error-2 test-error-3 test-error-4 \
test-dynap \
test-c6t test-c6t-2 test-c6t-3 test-c6t-4 test-c6t-5 test-c6t-6 test-c6t-7 test-c6t-8 \
test-thick-quad test-thick-quad-2 test-thick-quad-3 \
test-thick-dipole test-thick-dipole-2 test-thick-dipole-3 \
test-thick-rbend test-thick-solenoid \
test-jacobian test-jacobian-2 test-jacobian-knobs \
test-match test-match-2 test-match-3 test-match-4 \
test-match-5 test-match-6 test-match-7 test-match-8 test-match-9 test-match-10\
test-aperture test-aperture-2 test-aperture-3 \
test-beam test-addexpression test-read-write-hex \
test-permalign test-permalign-2 test-permalign-3 test-permalign-4 \
\
test-rfmultipole test-rfmultipole-2 test-rfmultipole-3 test-rfmultipole-4 test-rfmultipole-5 test-rfmultipole-6 test-rfmultipole-7 \
\
test-ptc-elements \
test-rfmultipole-ptc-1 \
test-ptc-twiss-1 test-ptc-twiss-2 test-ptc-twiss-3 test-ptc-twiss-4 test-ptc-twiss-6D-spin \
test-ptc-twiss-old1 test-ptc-twiss-old2 test-ptc-twiss-old3 test-ptc-twiss-old4 test-ptc-twiss-old5 test-ptc-twiss-old7 \
test-ptc-twiss-5D test-ptc-twiss-5Dt test-ptc-twiss-56D test-ptc-twiss-56Dt test-ptc-twiss-56Dl test-ptc-twiss-56Dtl test-ptc-twiss-6D test-ptc-twiss-6D-ALS \
test-ptc-twiss-accel-56D test-ptc-twiss-56Dt-ini_map_man test-ptc-twiss-56Dt-ini_mtx_man test-ptc-twiss-56Dt-ini_mtx_tbl test-ptc-twiss-tilt \
test-ptc-normal test-ptc-normal-5D-beambeam test-ptc-twiss-rotations \
test-ptc-twiss-normal-genfu test-ptc-twiss-normal-5D test-ptc-twiss-normal-6D test-ptc-twiss-maptable \
test-ptc-track test-ptc-track-2 test-ptc-track-3 test-ptc-track-4 test-ptc-track-5 \
test-ptc-track-acd test-ptc-track-acd-2 test-ptc-track-6Dtl-acd \
test-ptc-track-polygonaper \
test-ptc-trackline test-ptc-trackline-2 test-ptc-trackline-3 \
test-ptc-align test-ptc-align-2 \
test-touschek test-touschek-2 \
test-sequence test-sequence-2 test-sequence-3 test-sequence-4 test-sequence-5 test-sequence-6 test-sequence-7 test-sequence-8 test-sequence-9 test-sequence-10\
test-line \
test-plot test-plot-2 \
test-setknob test-fillknob \
test-coupling test-coupling-2 test-coupling-dqmin \
test-machine-clear \
\
$(call onlx64,$(user-cases),)
# same order as tests-all, tests that take +10 seconds
# to know the timing: make tests-all TIMER=time (on Unixes)
tests-long = \
test-memory \
test-taper \
test-track-7 test-track-8 test-track-10 test-track-11 \
test-dynap \
test-c6t-4 \
test-match-6 test-match-7 \
test-ptc-twiss-2 \
test-ptc-twiss-old7 \
test-touschek test-touschek-2 \
\
$(call onlx64,$(user-cases),)
# user-cases are run only with tests-all on Lxplus + AFS + Gnu 64 bit
user-cases = \
test-lhc test-hllhc test-hllhc-wire test-hllhc-fma test-lhc-wire test-lhc-virtualcorr
# tests to remove (e.g. that relies on external resources)
tests-to-rm =
# extra files to remove in cleantest
files-to-rm = \
Maxwellian_bend_for_ptc.txt Maxwellian_bend_for_ptc_electric.txt \
internal_mag_pot.txt sychrpart.txt twcavsettings.txt \
p4_ptc.tfs normal.tfs transfer.map debug.ptc leir.56dt.ptc.noorb.twiss \
*.ps *.pdf
# tests dependencies
#test-c6t: test-makethin-2
#test-track-2: test-makethin-2
#test-track-7: test-makethin-2
#test-track-8: test-makethin-2
# lexicographical order
tests-to-setup =
# testsuite titles (attached to first test of the suite, lexi. order)
test-aperture: TESTSUITE := Aperture testsuite
test-beam: TESTSUITE := Beam testsuite
test-c6t: TESTSUITE := SixTrack Conversion testsuite
test-coupling: TESTSUITE := Coupling testsuite
test-cororbit: TESTSUITE := Orbit Correction testsuite
test-dynap: TESTSUITE := Dynamic Aperture testsuite
test-emit: TESTSUITE := Emit testsuite
test-error: TESTSUITE := Error testsuite
test-ibs: TESTSUITE := IBS testsuite
test-jacobian: TESTSUITE := Jacobian testsuite
test-line: TESTSUITE := Line testsuite
test-lhc: TESTSUITE := LHC/HLLHC testsuite
test-makethin: TESTSUITE := Makethin testsuite
test-match: TESTSUITE := Matching testsuite
test-memory: TESTSUITE := Memory Management testsuite
test-plot: TESTSUITE := Plot Package testsuite
test-ptc-normal: TESTSUITE := PTC Normal testsuite
test-ptc-trackline: TESTSUITE := PTC Trackline testsuite
test-ptc-twiss: TESTSUITE := PTC Twiss testsuite
test-rfmultipole: TESTSUITE := RF Multipole testsuite
test-sequence: TESTSUITE := Sequence testsuite
test-survey: TESTSUITE := Survey testsuite
test-table: TESTSUITE := Table testsuite
test-thick-quad: TESTSUITE := Thick Element testsuite
test-touschek: TESTSUITE := Touschek testsuite
test-track: TESTSUITE := Track testsuite
test-twiss: TESTSUITE := Twiss testsuite
# end of testsuite
#################################################
# useful macros
onwin = $(if $(call eq,$(OSTYPE),Windows),$1,$2)
onlxp = $(if $(and $(call eq,$(OSTYPE),Linux),\
$(findstring lxplus,$(HOSTNAME)),\
$(wildcard /afs/cern.ch/eng/lhc/optics),yes),$1,$2)
onlx64 = $(if $(and $(call eq,$(ARCH),64),\
$(call eq,$(OSTYPE),Linux),\
$(call eq,$(COMP),gnu),\
$(wildcard /afs/cern.ch/eng/lhc/optics),yes),$1,$2)
# info on macros above
# $(info $(ARCH) $(OSTYPE) $(HOSTNAME) $(wildcard /afs/cern.ch/eng/lhc/optics))
# madx supported command for tests
ifndef MADX
MADXCMD := $(firstword $(wildcard $(PROJECT)$(ARCH)$(BINARY_EXT) $(PROJECT)$(BINARY_EXT)))
MADX := $(if $(MADXCMD),..$/..$/$(MADXCMD),$(PROJECT)_dev$(ARCH)$(BINARY_EXT))
endif
TESTCMD = $(TIMER) $(MADX) $(@F).madx
ifneq ($(filter tests%,$(MAKECMDGOALS)),)
$(info on lxplus with gnu64? $(call onlx64,will run tests: $(user-cases),none))
endif
# end of makefile