Revision dbfe06c6

b/Makefile
162 162
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx
163 163
	$(call quiet-command,sh $(SRC_PATH)/scripts/hxtool -h < $< > $@,"  GEN   $@")
164 164

  
165
check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS)
166

  
167
check-qint: check-qint.o qint.o $(tools-obj-y)
168
check-qstring: check-qstring.o qstring.o $(tools-obj-y)
169
check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y)
170
check-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y)
171
check-qfloat: check-qfloat.o qfloat.o $(tools-obj-y)
172
check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y)
173
test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y)
174

  
175 165
$(qapi-obj-y): $(GENERATED_HEADERS)
176 166
qapi-dir := $(BUILD_DIR)/qapi-generated
177
test-qmp-input-visitor.o test-qmp-output-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir)
178 167
qemu-ga$(EXESUF): LIBS = $(LIBS_QGA)
179 168

  
180 169
gen-out-type = $(subst .,-,$(suffix $@))
181 170

  
182
$(qapi-dir)/test-qapi-types.c $(qapi-dir)/test-qapi-types.h :\
183
$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
184
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
185
$(qapi-dir)/test-qapi-visit.c $(qapi-dir)/test-qapi-visit.h :\
186
$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py
187
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
188
$(qapi-dir)/test-qmp-commands.h $(qapi-dir)/test-qmp-marshal.c :\
189
$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
190
	    $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
171
include $(SRC_PATH)/tests/Makefile
191 172

  
192 173
$(qapi-dir)/qga-qapi-types.c $(qapi-dir)/qga-qapi-types.h :\
193 174
$(SRC_PATH)/qapi-schema-guest.json $(SRC_PATH)/scripts/qapi-types.py
......
209 190
$(SRC_PATH)/qapi-schema.json $(SRC_PATH)/scripts/qapi-commands.py
210 191
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -m -o "." < $<, "  GEN   $@")
211 192

  
212
test-qmp-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
213
test-qmp-output-visitor: test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
214

  
215
test-qmp-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
216
test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
217

  
218
test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y)
219
test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
220

  
221 193
QGALIB_OBJ=$(addprefix $(qapi-dir)/, qga-qapi-types.o qga-qapi-visit.o qga-qmp-marshal.o)
222 194
QGALIB_GEN=$(addprefix $(qapi-dir)/, qga-qapi-types.h qga-qapi-visit.h qga-qmp-commands.h)
223 195
$(QGALIB_OBJ): $(QGALIB_GEN) $(GENERATED_HEADERS)
......
321 293
test speed: all
322 294
	$(MAKE) -C tests/tcg $@
323 295

  
324
.PHONY: check
325
check: $(patsubst %,run-check-%,$(CHECKS))
326

  
327
run-check-%: %
328
	./$<
329

  
330 296
.PHONY: TAGS
331 297
TAGS:
332 298
	find "$(SRC_PATH)" -name '*.[hc]' -print0 | xargs -0 etags
b/tests/Makefile
1
check-qint.o check-qstring.o check-qdict.o check-qlist.o check-qfloat.o check-qjson.o test-coroutine.o: $(GENERATED_HEADERS)
2

  
3
check-qint: check-qint.o qint.o $(tools-obj-y)
4
check-qstring: check-qstring.o qstring.o $(tools-obj-y)
5
check-qdict: check-qdict.o qdict.o qfloat.o qint.o qstring.o qbool.o qlist.o $(tools-obj-y)
6
check-qlist: check-qlist.o qlist.o qint.o $(tools-obj-y)
7
check-qfloat: check-qfloat.o qfloat.o $(tools-obj-y)
8
check-qjson: check-qjson.o $(qobject-obj-y) $(tools-obj-y)
9
test-coroutine: test-coroutine.o qemu-timer-common.o async.o $(coroutine-obj-y) $(tools-obj-y)
10

  
11
test-qmp-input-visitor.o test-qmp-output-visitor.o test-qmp-commands.o qemu-ga$(EXESUF): QEMU_CFLAGS += -I $(qapi-dir)
12

  
13
$(qapi-dir)/test-qapi-types.c $(qapi-dir)/test-qapi-types.h :\
14
$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py
15
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
16
$(qapi-dir)/test-qapi-visit.c $(qapi-dir)/test-qapi-visit.h :\
17
$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py
18
	$(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
19
$(qapi-dir)/test-qmp-commands.h $(qapi-dir)/test-qmp-marshal.c :\
20
$(SRC_PATH)/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py
21
	    $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o "$(qapi-dir)" -p "test-" < $<, "  GEN   $@")
22

  
23

  
24
test-qmp-output-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
25
test-qmp-output-visitor: test-qmp-output-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
26

  
27
test-qmp-input-visitor.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h) $(qapi-obj-y)
28
test-qmp-input-visitor: test-qmp-input-visitor.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o
29

  
30
test-qmp-commands.o: $(addprefix $(qapi-dir)/, test-qapi-types.c test-qapi-types.h test-qapi-visit.c test-qapi-visit.h test-qmp-marshal.c test-qmp-commands.h) $(qapi-obj-y)
31
test-qmp-commands: test-qmp-commands.o $(qobject-obj-y) $(qapi-obj-y) $(tools-obj-y) $(qapi-dir)/test-qapi-visit.o $(qapi-dir)/test-qapi-types.o $(qapi-dir)/test-qmp-marshal.o module.o
32

  
33
.PHONY: check
34
check: $(patsubst %,run-check-%,$(CHECKS))
35

  
36
run-check-%: %
37
	./$<
38

  

Also available in: Unified diff