Kevin Wolf | 8959449 | 2012-03-08 12:29:00 +0100 | [diff] [blame] | 1 | export SRC_PATH |
| 2 | |
Peter Maydell | 3687d53 | 2014-01-23 16:22:59 +0000 | [diff] [blame] | 3 | # Get the list of all supported sysemu targets |
| 4 | SYSEMU_TARGET_LIST := $(subst -softmmu.mak,,$(notdir \ |
| 5 | $(wildcard $(SRC_PATH)/default-configs/*-softmmu.mak))) |
| 6 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 7 | check-unit-y = tests/check-qdict$(EXESUF) |
Paolo Bonzini | 5f7a74a | 2013-01-15 09:49:35 +0100 | [diff] [blame] | 8 | gcov-files-check-qdict-y = qobject/qdict.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 9 | check-unit-y += tests/check-qfloat$(EXESUF) |
Paolo Bonzini | 5f7a74a | 2013-01-15 09:49:35 +0100 | [diff] [blame] | 10 | gcov-files-check-qfloat-y = qobject/qfloat.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 11 | check-unit-y += tests/check-qint$(EXESUF) |
Paolo Bonzini | 5f7a74a | 2013-01-15 09:49:35 +0100 | [diff] [blame] | 12 | gcov-files-check-qint-y = qobject/qint.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 13 | check-unit-y += tests/check-qstring$(EXESUF) |
Paolo Bonzini | 5f7a74a | 2013-01-15 09:49:35 +0100 | [diff] [blame] | 14 | gcov-files-check-qstring-y = qobject/qstring.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 15 | check-unit-y += tests/check-qlist$(EXESUF) |
Paolo Bonzini | 5f7a74a | 2013-01-15 09:49:35 +0100 | [diff] [blame] | 16 | gcov-files-check-qlist-y = qobject/qlist.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 17 | check-unit-y += tests/check-qjson$(EXESUF) |
Paolo Bonzini | 5f7a74a | 2013-01-15 09:49:35 +0100 | [diff] [blame] | 18 | gcov-files-check-qjson-y = qobject/qjson.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 19 | check-unit-y += tests/test-qmp-output-visitor$(EXESUF) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 20 | gcov-files-test-qmp-output-visitor-y = qapi/qmp-output-visitor.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 21 | check-unit-y += tests/test-qmp-input-visitor$(EXESUF) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 22 | gcov-files-test-qmp-input-visitor-y = qapi/qmp-input-visitor.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 23 | check-unit-y += tests/test-qmp-input-strict$(EXESUF) |
| 24 | check-unit-y += tests/test-qmp-commands$(EXESUF) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 25 | gcov-files-test-qmp-commands-y = qapi/qmp-dispatch.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 26 | check-unit-y += tests/test-string-input-visitor$(EXESUF) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 27 | gcov-files-test-string-input-visitor-y = qapi/string-input-visitor.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 28 | check-unit-y += tests/test-string-output-visitor$(EXESUF) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 29 | gcov-files-test-string-output-visitor-y = qapi/string-output-visitor.c |
Laszlo Ersek | 3953e3a | 2013-08-20 00:35:40 +0200 | [diff] [blame] | 30 | check-unit-y += tests/test-opts-visitor$(EXESUF) |
| 31 | gcov-files-test-opts-visitor-y = qapi/opts-visitor.c |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 32 | check-unit-y += tests/test-coroutine$(EXESUF) |
Peter Maydell | 7c2acc7 | 2013-04-08 12:11:27 +0100 | [diff] [blame] | 33 | gcov-files-test-coroutine-y = coroutine-$(CONFIG_COROUTINE_BACKEND).c |
Michael Roth | 2d49610 | 2012-02-21 21:05:07 -0600 | [diff] [blame] | 34 | check-unit-y += tests/test-visitor-serialization$(EXESUF) |
Michael Tokarev | 2278a69 | 2012-06-07 20:08:19 +0400 | [diff] [blame] | 35 | check-unit-y += tests/test-iov$(EXESUF) |
Paolo Bonzini | 5f7a74a | 2013-01-15 09:49:35 +0100 | [diff] [blame] | 36 | gcov-files-test-iov-y = util/iov.c |
Paolo Bonzini | b2ea25d | 2012-11-23 16:13:23 +0100 | [diff] [blame] | 37 | check-unit-y += tests/test-aio$(EXESUF) |
Benoît Canet | f17cfe8 | 2013-09-02 14:14:38 +0200 | [diff] [blame] | 38 | check-unit-y += tests/test-throttle$(EXESUF) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 39 | gcov-files-test-aio-$(CONFIG_WIN32) = aio-win32.c |
| 40 | gcov-files-test-aio-$(CONFIG_POSIX) = aio-posix.c |
Paolo Bonzini | 74c856e | 2012-11-23 16:13:24 +0100 | [diff] [blame] | 41 | check-unit-y += tests/test-thread-pool$(EXESUF) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 42 | gcov-files-test-thread-pool-y = thread-pool.c |
Paolo Bonzini | e7c033c | 2013-01-21 17:09:40 +0100 | [diff] [blame] | 43 | gcov-files-test-hbitmap-y = util/hbitmap.c |
| 44 | check-unit-y += tests/test-hbitmap$(EXESUF) |
Eduardo Habkost | 247c9de | 2013-01-23 15:58:27 -0200 | [diff] [blame] | 45 | check-unit-y += tests/test-x86-cpuid$(EXESUF) |
| 46 | # all code tested by test-x86-cpuid is inside topology.h |
| 47 | gcov-files-test-x86-cpuid-y = |
Orit Wasserman | 21e3cd2 | 2013-01-31 09:12:16 +0200 | [diff] [blame] | 48 | check-unit-y += tests/test-xbzrle$(EXESUF) |
| 49 | gcov-files-test-xbzrle-y = xbzrle.c |
Eduardo Habkost | e3f9fe2 | 2013-02-04 16:27:45 -0200 | [diff] [blame] | 50 | check-unit-y += tests/test-cutils$(EXESUF) |
| 51 | gcov-files-test-cutils-y += util/cutils.c |
Richard Henderson | f4c0f98 | 2013-02-16 12:47:01 -0800 | [diff] [blame] | 52 | check-unit-y += tests/test-mul64$(EXESUF) |
| 53 | gcov-files-test-mul64-y = util/host-utils.c |
Paolo Bonzini | 6046c62 | 2013-06-20 16:19:32 +0200 | [diff] [blame] | 54 | check-unit-y += tests/test-int128$(EXESUF) |
| 55 | # all code tested by test-int128 is inside int128.h |
| 56 | gcov-files-test-int128-y = |
Peter Maydell | 3464700 | 2013-06-28 12:40:32 +0100 | [diff] [blame] | 57 | check-unit-y += tests/test-bitops$(EXESUF) |
Eduardo Habkost | 747b0cb | 2013-07-10 17:08:40 -0300 | [diff] [blame] | 58 | check-unit-y += tests/test-qdev-global-props$(EXESUF) |
Igor Mammedov | 14389db | 2013-12-20 22:14:40 +0100 | [diff] [blame] | 59 | check-unit-y += tests/check-qom-interface$(EXESUF) |
| 60 | gcov-files-check-qom-interface-y = qom/object.c |
Eduardo Habkost | 2668b4b | 2013-11-28 12:01:18 -0200 | [diff] [blame] | 61 | check-unit-y += tests/test-vmstate$(EXESUF) |
Anthony Liguori | ad65aa8 | 2012-01-10 13:10:51 -0600 | [diff] [blame] | 62 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 63 | check-block-$(CONFIG_POSIX) += tests/qemu-iotests-quick.sh |
Anthony Liguori | dbfe06c | 2012-01-10 13:10:43 -0600 | [diff] [blame] | 64 | |
Anthony Liguori | d1aaf54 | 2012-03-28 15:42:07 +0200 | [diff] [blame] | 65 | # All QTests for now are POSIX-only, but the dependencies are |
| 66 | # really in libqtest, not in the testcases themselves. |
Andreas Färber | a21baf7 | 2013-11-07 18:25:10 +0100 | [diff] [blame] | 67 | |
Andreas Färber | 1f9c4cf | 2013-08-02 00:48:40 +0200 | [diff] [blame] | 68 | gcov-files-ipack-y += hw/ipack/ipack.c |
Andreas Färber | 3714682 | 2014-02-09 12:24:15 +0100 | [diff] [blame] | 69 | check-qtest-ipack-y += tests/ipoctal232-test$(EXESUF) |
| 70 | gcov-files-ipack-y += hw/char/ipoctal232.c |
| 71 | |
Andreas Färber | b815ec5 | 2014-02-09 04:13:37 +0100 | [diff] [blame] | 72 | gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio.c |
| 73 | check-qtest-virtio-y += tests/virtio-net-test$(EXESUF) |
| 74 | gcov-files-virtio-y += i386-softmmu/hw/net/virtio-net.c |
Andreas Färber | 02063aa | 2014-02-09 04:39:47 +0100 | [diff] [blame] | 75 | check-qtest-virtio-y += tests/virtio-balloon-test$(EXESUF) |
| 76 | gcov-files-virtio-y += i386-softmmu/hw/virtio/virtio-balloon.c |
Andreas Färber | c7a59be | 2014-02-09 04:32:55 +0100 | [diff] [blame] | 77 | check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF) |
| 78 | gcov-files-virtio-y += i386-softmmu/hw/block/virtio-blk.c |
Andreas Färber | b6f46f0 | 2014-02-09 04:43:10 +0100 | [diff] [blame] | 79 | check-qtest-virtio-y += tests/virtio-rng-test$(EXESUF) |
| 80 | gcov-files-virtio-y += hw/virtio/virtio-rng.c |
Andreas Färber | 26c9a01 | 2014-02-21 16:42:15 +0100 | [diff] [blame^] | 81 | check-qtest-virtio-y += tests/virtio-scsi-test$(EXESUF) |
| 82 | gcov-files-virtio-y += i386-softmmu/hw/scsi/virtio-scsi.c |
Andreas Färber | b815ec5 | 2014-02-09 04:13:37 +0100 | [diff] [blame] | 83 | |
Andreas Färber | a21baf7 | 2013-11-07 18:25:10 +0100 | [diff] [blame] | 84 | check-qtest-pci-y += tests/e1000-test$(EXESUF) |
| 85 | gcov-files-pci-y += hw/net/e1000.c |
Andreas Färber | 74769fe | 2013-11-07 18:43:09 +0100 | [diff] [blame] | 86 | check-qtest-pci-y += tests/rtl8139-test$(EXESUF) |
| 87 | gcov-files-pci-y += hw/net/rtl8139.c |
Andreas Färber | 85f68d5 | 2013-11-07 18:53:28 +0100 | [diff] [blame] | 88 | check-qtest-pci-y += tests/pcnet-test$(EXESUF) |
| 89 | gcov-files-pci-y += hw/net/pcnet.c |
| 90 | gcov-files-pci-y += hw/net/pcnet-pci.c |
Andreas Färber | 92838a1 | 2013-11-07 19:18:46 +0100 | [diff] [blame] | 91 | check-qtest-pci-y += tests/eepro100-test$(EXESUF) |
| 92 | gcov-files-pci-y += hw/net/eepro100.c |
Andreas Färber | 5297ea6 | 2014-02-09 04:01:37 +0100 | [diff] [blame] | 93 | check-qtest-pci-y += tests/ne2000-test$(EXESUF) |
| 94 | gcov-files-pci-y += hw/net/ne2000.c |
Andreas Färber | b815ec5 | 2014-02-09 04:13:37 +0100 | [diff] [blame] | 95 | check-qtest-pci-y += $(check-qtest-virtio-y) |
| 96 | gcov-files-pci-y += $(gcov-files-virtio-y) hw/virtio/virtio-pci.c |
Andreas Färber | 7649107 | 2014-02-09 03:48:44 +0100 | [diff] [blame] | 97 | check-qtest-pci-y += tests/tpci200-test$(EXESUF) |
Andreas Färber | 83bb0b2 | 2014-02-21 16:29:17 +0100 | [diff] [blame] | 98 | gcov-files-pci-y += hw/ipack/tpci200.c |
Andreas Färber | 3714682 | 2014-02-09 12:24:15 +0100 | [diff] [blame] | 99 | check-qtest-pci-y += $(check-qtest-ipack-y) |
Andreas Färber | 83bb0b2 | 2014-02-21 16:29:17 +0100 | [diff] [blame] | 100 | gcov-files-pci-y += $(gcov-files-ipack-y) |
Andreas Färber | a21baf7 | 2013-11-07 18:25:10 +0100 | [diff] [blame] | 101 | |
Paolo Bonzini | 8fefa31 | 2013-07-22 15:54:34 +0200 | [diff] [blame] | 102 | check-qtest-i386-y = tests/endianness-test$(EXESUF) |
| 103 | check-qtest-i386-y += tests/fdc-test$(EXESUF) |
Andreas Färber | 5ec889b | 2014-02-14 15:09:28 +0100 | [diff] [blame] | 104 | gcov-files-i386-y = hw/block/fdc.c |
Kevin Wolf | acbe480 | 2013-05-08 11:18:41 +0200 | [diff] [blame] | 105 | check-qtest-i386-y += tests/ide-test$(EXESUF) |
Markus Armbruster | 0e8a8c8 | 2012-07-10 11:12:30 +0200 | [diff] [blame] | 106 | check-qtest-i386-y += tests/hd-geo-test$(EXESUF) |
Andreas Färber | 5ec889b | 2014-02-14 15:09:28 +0100 | [diff] [blame] | 107 | gcov-files-i386-y += hw/block/hd-geometry.c |
Markus Armbruster | edbd790 | 2013-06-26 15:52:13 +0200 | [diff] [blame] | 108 | check-qtest-i386-y += tests/boot-order-test$(EXESUF) |
Michael S. Tsirkin | ad6423a | 2013-10-18 00:52:18 +0300 | [diff] [blame] | 109 | check-qtest-i386-y += tests/acpi-test$(EXESUF) |
Stefan Weil | fba0c40 | 2012-05-15 18:19:45 +0200 | [diff] [blame] | 110 | check-qtest-i386-y += tests/rtc-test$(EXESUF) |
Anthony Liguori | 9bda413 | 2013-04-16 09:45:19 -0500 | [diff] [blame] | 111 | check-qtest-i386-y += tests/i440fx-test$(EXESUF) |
Anthony Liguori | bf2a38d | 2013-04-16 09:45:21 -0500 | [diff] [blame] | 112 | check-qtest-i386-y += tests/fw_cfg-test$(EXESUF) |
Stefan Hajnoczi | 7ceeedd | 2013-10-30 14:54:34 +0100 | [diff] [blame] | 113 | check-qtest-i386-y += tests/blockdev-test$(EXESUF) |
Stefan Hajnoczi | 43cd209 | 2013-10-30 14:54:35 +0100 | [diff] [blame] | 114 | check-qtest-i386-y += tests/qdev-monitor-test$(EXESUF) |
Andreas Färber | a21baf7 | 2013-11-07 18:25:10 +0100 | [diff] [blame] | 115 | check-qtest-i386-y += $(check-qtest-pci-y) |
| 116 | gcov-files-i386-y += $(gcov-files-pci-y) |
Andreas Färber | 4a053e7 | 2013-11-07 18:37:34 +0100 | [diff] [blame] | 117 | check-qtest-i386-y += tests/vmxnet3-test$(EXESUF) |
| 118 | gcov-files-i386-y += hw/net/vmxnet3.c |
| 119 | gcov-files-i386-y += hw/net/vmxnet_rx_pkt.c |
| 120 | gcov-files-i386-y += hw/net/vmxnet_tx_pkt.c |
Anthony Liguori | d1aaf54 | 2012-03-28 15:42:07 +0200 | [diff] [blame] | 121 | check-qtest-x86_64-y = $(check-qtest-i386-y) |
Andreas Färber | 5ec889b | 2014-02-14 15:09:28 +0100 | [diff] [blame] | 122 | gcov-files-i386-y += i386-softmmu/hw/timer/mc146818rtc.c |
Andreas Färber | c5cd02b | 2013-01-26 12:45:14 +0100 | [diff] [blame] | 123 | gcov-files-x86_64-y = $(subst i386-softmmu/,x86_64-softmmu/,$(gcov-files-i386-y)) |
Paolo Bonzini | 8fefa31 | 2013-07-22 15:54:34 +0200 | [diff] [blame] | 124 | check-qtest-mips-y = tests/endianness-test$(EXESUF) |
| 125 | check-qtest-mips64-y = tests/endianness-test$(EXESUF) |
| 126 | check-qtest-mips64el-y = tests/endianness-test$(EXESUF) |
| 127 | check-qtest-ppc-y = tests/endianness-test$(EXESUF) |
| 128 | check-qtest-ppc64-y = tests/endianness-test$(EXESUF) |
| 129 | check-qtest-sh4-y = tests/endianness-test$(EXESUF) |
| 130 | check-qtest-sh4eb-y = tests/endianness-test$(EXESUF) |
| 131 | check-qtest-sparc64-y = tests/endianness-test$(EXESUF) |
Anthony Liguori | baeddde | 2013-01-29 15:42:45 -0600 | [diff] [blame] | 132 | #check-qtest-sparc-y = tests/m48t59-test$(EXESUF) |
Paolo Bonzini | 8fefa31 | 2013-07-22 15:54:34 +0200 | [diff] [blame] | 133 | #check-qtest-sparc64-y += tests/m48t59-test$(EXESUF) |
Andreas Färber | 5ec889b | 2014-02-14 15:09:28 +0100 | [diff] [blame] | 134 | gcov-files-sparc-y += hw/timer/m48t59.c |
| 135 | gcov-files-sparc64-y += hw/timer/m48t59.c |
Andreas Färber | 6e99890 | 2013-01-16 01:57:57 +0100 | [diff] [blame] | 136 | check-qtest-arm-y = tests/tmp105-test$(EXESUF) |
Andreas Färber | 5ec889b | 2014-02-14 15:09:28 +0100 | [diff] [blame] | 137 | gcov-files-arm-y += hw/misc/tmp105.c |
Andreas Färber | 530a7e4 | 2013-06-26 15:52:16 +0200 | [diff] [blame] | 138 | check-qtest-ppc-y += tests/boot-order-test$(EXESUF) |
| 139 | check-qtest-ppc64-y += tests/boot-order-test$(EXESUF) |
Andreas Färber | 7c41f21 | 2013-07-29 05:44:47 +0200 | [diff] [blame] | 140 | check-qtest-microblazeel-y = $(check-qtest-microblaze-y) |
Andreas Färber | 7c41f21 | 2013-07-29 05:44:47 +0200 | [diff] [blame] | 141 | check-qtest-xtensaeb-y = $(check-qtest-xtensa-y) |
Anthony Liguori | d1aaf54 | 2012-03-28 15:42:07 +0200 | [diff] [blame] | 142 | |
Peter Maydell | 3687d53 | 2014-01-23 16:22:59 +0000 | [diff] [blame] | 143 | # qom-test works for all sysemu architectures: |
| 144 | $(foreach target,$(SYSEMU_TARGET_LIST), \ |
| 145 | $(eval check-qtest-$(target)-y += tests/qom-test$(EXESUF))) |
| 146 | |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 147 | check-qapi-schema-y := $(addprefix tests/qapi-schema/, \ |
| 148 | comments.json empty.json funny-char.json indented-expr.json \ |
| 149 | missing-colon.json missing-comma-list.json \ |
| 150 | missing-comma-object.json non-objects.json \ |
Markus Armbruster | 4f193e3 | 2013-07-27 17:41:54 +0200 | [diff] [blame] | 151 | qapi-schema-test.json quoted-structural-chars.json \ |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 152 | trailing-comma-list.json trailing-comma-object.json \ |
Wenchao Xia | 4b35991 | 2014-03-04 18:44:32 -0800 | [diff] [blame] | 153 | unclosed-list.json unclosed-object.json unclosed-string.json \ |
Wenchao Xia | b86b05e | 2014-03-04 18:44:34 -0800 | [diff] [blame] | 154 | duplicate-key.json union-invalid-base.json flat-union-no-base.json \ |
| 155 | flat-union-invalid-discriminator.json \ |
Wenchao Xia | 5223070 | 2014-03-04 18:44:39 -0800 | [diff] [blame] | 156 | flat-union-invalid-branch-key.json flat-union-reverse-define.json \ |
| 157 | flat-union-string-discriminator.json) |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 158 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 159 | GENERATED_HEADERS += tests/test-qapi-types.h tests/test-qapi-visit.h tests/test-qmp-commands.h |
Anthony Liguori | dbfe06c | 2012-01-10 13:10:43 -0600 | [diff] [blame] | 160 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 161 | test-obj-y = tests/check-qint.o tests/check-qstring.o tests/check-qdict.o \ |
| 162 | tests/check-qlist.o tests/check-qfloat.o tests/check-qjson.o \ |
| 163 | tests/test-coroutine.o tests/test-string-output-visitor.o \ |
| 164 | tests/test-string-input-visitor.o tests/test-qmp-output-visitor.o \ |
| 165 | tests/test-qmp-input-visitor.o tests/test-qmp-input-strict.o \ |
Eduardo Habkost | 247c9de | 2013-01-23 15:58:27 -0200 | [diff] [blame] | 166 | tests/test-qmp-commands.o tests/test-visitor-serialization.o \ |
Laszlo Ersek | 3953e3a | 2013-08-20 00:35:40 +0200 | [diff] [blame] | 167 | tests/test-x86-cpuid.o tests/test-mul64.o tests/test-int128.o \ |
| 168 | tests/test-opts-visitor.o |
Anthony Liguori | dbfe06c | 2012-01-10 13:10:43 -0600 | [diff] [blame] | 169 | |
Paolo Bonzini | 576d550 | 2012-12-20 15:27:51 +0100 | [diff] [blame] | 170 | test-qapi-obj-y = tests/test-qapi-visit.o tests/test-qapi-types.o |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 171 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 172 | $(test-obj-y): QEMU_INCLUDES += -Itests |
Anthony Liguori | c4efe1c | 2013-04-16 09:45:16 -0500 | [diff] [blame] | 173 | QEMU_CFLAGS += -I$(SRC_PATH)/tests |
Igor Mammedov | 14389db | 2013-12-20 22:14:40 +0100 | [diff] [blame] | 174 | qom-core-obj = qom/object.o qom/qom-qobject.o qom/container.o |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 175 | |
Eduardo Habkost | 247c9de | 2013-01-23 15:58:27 -0200 | [diff] [blame] | 176 | tests/test-x86-cpuid.o: QEMU_INCLUDES += -I$(SRC_PATH)/target-i386 |
| 177 | |
Paolo Bonzini | a372823 | 2012-12-20 16:10:26 +0100 | [diff] [blame] | 178 | tests/check-qint$(EXESUF): tests/check-qint.o libqemuutil.a |
| 179 | tests/check-qstring$(EXESUF): tests/check-qstring.o libqemuutil.a |
| 180 | tests/check-qdict$(EXESUF): tests/check-qdict.o libqemuutil.a |
| 181 | tests/check-qlist$(EXESUF): tests/check-qlist.o libqemuutil.a |
| 182 | tests/check-qfloat$(EXESUF): tests/check-qfloat.o libqemuutil.a |
| 183 | tests/check-qjson$(EXESUF): tests/check-qjson.o libqemuutil.a libqemustub.a |
Peter Crosthwaite | 3dbe85b | 2014-01-15 03:05:36 -0800 | [diff] [blame] | 184 | tests/check-qom-interface$(EXESUF): tests/check-qom-interface.o $(qom-core-obj) libqemuutil.a libqemustub.a |
Paolo Bonzini | f157ebb | 2012-12-20 16:09:36 +0100 | [diff] [blame] | 185 | tests/test-coroutine$(EXESUF): tests/test-coroutine.o $(block-obj-y) libqemuutil.a libqemustub.a |
| 186 | tests/test-aio$(EXESUF): tests/test-aio.o $(block-obj-y) libqemuutil.a libqemustub.a |
Benoît Canet | f17cfe8 | 2013-09-02 14:14:38 +0200 | [diff] [blame] | 187 | tests/test-throttle$(EXESUF): tests/test-throttle.o $(block-obj-y) libqemuutil.a libqemustub.a |
Paolo Bonzini | f157ebb | 2012-12-20 16:09:36 +0100 | [diff] [blame] | 188 | tests/test-thread-pool$(EXESUF): tests/test-thread-pool.o $(block-obj-y) libqemuutil.a libqemustub.a |
| 189 | tests/test-iov$(EXESUF): tests/test-iov.o libqemuutil.a |
Paolo Bonzini | e7c033c | 2013-01-21 17:09:40 +0100 | [diff] [blame] | 190 | tests/test-hbitmap$(EXESUF): tests/test-hbitmap.o libqemuutil.a libqemustub.a |
Eduardo Habkost | 247c9de | 2013-01-23 15:58:27 -0200 | [diff] [blame] | 191 | tests/test-x86-cpuid$(EXESUF): tests/test-x86-cpuid.o |
Orit Wasserman | 21e3cd2 | 2013-01-31 09:12:16 +0200 | [diff] [blame] | 192 | tests/test-xbzrle$(EXESUF): tests/test-xbzrle.o xbzrle.o page_cache.o libqemuutil.a |
Eduardo Habkost | e3f9fe2 | 2013-02-04 16:27:45 -0200 | [diff] [blame] | 193 | tests/test-cutils$(EXESUF): tests/test-cutils.o util/cutils.o |
Paolo Bonzini | 6046c62 | 2013-06-20 16:19:32 +0200 | [diff] [blame] | 194 | tests/test-int128$(EXESUF): tests/test-int128.o |
Eduardo Habkost | 747b0cb | 2013-07-10 17:08:40 -0300 | [diff] [blame] | 195 | tests/test-qdev-global-props$(EXESUF): tests/test-qdev-global-props.o \ |
Igor Mammedov | 5e95494 | 2014-02-05 16:36:52 +0100 | [diff] [blame] | 196 | hw/core/qdev.o hw/core/qdev-properties.o hw/core/hotplug.o\ |
Eduardo Habkost | 747b0cb | 2013-07-10 17:08:40 -0300 | [diff] [blame] | 197 | hw/core/irq.o \ |
Igor Mammedov | 14389db | 2013-12-20 22:14:40 +0100 | [diff] [blame] | 198 | $(qom-core-obj) \ |
Eduardo Habkost | 747b0cb | 2013-07-10 17:08:40 -0300 | [diff] [blame] | 199 | $(test-qapi-obj-y) \ |
| 200 | libqemuutil.a libqemustub.a |
Eduardo Habkost | 2668b4b | 2013-11-28 12:01:18 -0200 | [diff] [blame] | 201 | tests/test-vmstate$(EXESUF): tests/test-vmstate.o \ |
| 202 | vmstate.o qemu-file.o \ |
| 203 | libqemuutil.a |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 204 | |
| 205 | tests/test-qapi-types.c tests/test-qapi-types.h :\ |
Markus Armbruster | 4f193e3 | 2013-07-27 17:41:54 +0200 | [diff] [blame] | 206 | $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-types.py |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 207 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-types.py $(gen-out-type) -o tests -p "test-" < $<, " GEN $@") |
| 208 | tests/test-qapi-visit.c tests/test-qapi-visit.h :\ |
Markus Armbruster | 4f193e3 | 2013-07-27 17:41:54 +0200 | [diff] [blame] | 209 | $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-visit.py |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 210 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-visit.py $(gen-out-type) -o tests -p "test-" < $<, " GEN $@") |
| 211 | tests/test-qmp-commands.h tests/test-qmp-marshal.c :\ |
Markus Armbruster | 4f193e3 | 2013-07-27 17:41:54 +0200 | [diff] [blame] | 212 | $(SRC_PATH)/tests/qapi-schema/qapi-schema-test.json $(SRC_PATH)/scripts/qapi-commands.py |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 213 | $(call quiet-command,$(PYTHON) $(SRC_PATH)/scripts/qapi-commands.py $(gen-out-type) -o tests -p "test-" < $<, " GEN $@") |
Anthony Liguori | dbfe06c | 2012-01-10 13:10:43 -0600 | [diff] [blame] | 214 | |
Paolo Bonzini | 8a09070 | 2012-12-20 15:40:20 +0100 | [diff] [blame] | 215 | tests/test-string-output-visitor$(EXESUF): tests/test-string-output-visitor.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a |
| 216 | tests/test-string-input-visitor$(EXESUF): tests/test-string-input-visitor.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a |
| 217 | tests/test-qmp-output-visitor$(EXESUF): tests/test-qmp-output-visitor.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a |
| 218 | tests/test-qmp-input-visitor$(EXESUF): tests/test-qmp-input-visitor.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a |
| 219 | tests/test-qmp-input-strict$(EXESUF): tests/test-qmp-input-strict.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a |
Paolo Bonzini | 59cacde | 2012-12-20 15:03:18 +0100 | [diff] [blame] | 220 | tests/test-qmp-commands$(EXESUF): tests/test-qmp-commands.o tests/test-qmp-marshal.o $(test-qapi-obj-y) qapi-types.o qapi-visit.o libqemuutil.a libqemustub.a |
Paolo Bonzini | 8a09070 | 2012-12-20 15:40:20 +0100 | [diff] [blame] | 221 | tests/test-visitor-serialization$(EXESUF): tests/test-visitor-serialization.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a |
Laszlo Ersek | 3953e3a | 2013-08-20 00:35:40 +0200 | [diff] [blame] | 222 | tests/test-opts-visitor$(EXESUF): tests/test-opts-visitor.o $(test-qapi-obj-y) libqemuutil.a libqemustub.a |
Paolo Bonzini | 2d7799f | 2012-02-09 11:21:03 +0100 | [diff] [blame] | 223 | |
Richard Henderson | f4c0f98 | 2013-02-16 12:47:01 -0800 | [diff] [blame] | 224 | tests/test-mul64$(EXESUF): tests/test-mul64.o libqemuutil.a |
Peter Maydell | 3464700 | 2013-06-28 12:40:32 +0100 | [diff] [blame] | 225 | tests/test-bitops$(EXESUF): tests/test-bitops.o libqemuutil.a |
Richard Henderson | f4c0f98 | 2013-02-16 12:47:01 -0800 | [diff] [blame] | 226 | |
Anthony Liguori | 234c69c | 2013-04-16 09:45:17 -0500 | [diff] [blame] | 227 | libqos-obj-y = tests/libqos/pci.o tests/libqos/fw_cfg.o |
Andreas Färber | cc9936a | 2013-05-02 15:56:26 +0200 | [diff] [blame] | 228 | libqos-obj-y += tests/libqos/i2c.o |
Markus Armbruster | 26491a3 | 2013-06-26 15:52:22 +0200 | [diff] [blame] | 229 | libqos-pc-obj-y = $(libqos-obj-y) tests/libqos/pci-pc.o |
Anthony Liguori | 8a0743c | 2013-04-16 09:45:18 -0500 | [diff] [blame] | 230 | libqos-pc-obj-y += tests/libqos/malloc-pc.o |
Andreas Färber | cc9936a | 2013-05-02 15:56:26 +0200 | [diff] [blame] | 231 | libqos-omap-obj-y = $(libqos-obj-y) tests/libqos/i2c-omap.o |
Anthony Liguori | c4efe1c | 2013-04-16 09:45:16 -0500 | [diff] [blame] | 232 | |
Paolo Bonzini | ff667e2 | 2012-12-21 09:45:20 +0100 | [diff] [blame] | 233 | tests/rtc-test$(EXESUF): tests/rtc-test.o |
| 234 | tests/m48t59-test$(EXESUF): tests/m48t59-test.o |
Paolo Bonzini | 8fefa31 | 2013-07-22 15:54:34 +0200 | [diff] [blame] | 235 | tests/endianness-test$(EXESUF): tests/endianness-test.o |
Paolo Bonzini | ff667e2 | 2012-12-21 09:45:20 +0100 | [diff] [blame] | 236 | tests/fdc-test$(EXESUF): tests/fdc-test.o |
Kevin Wolf | acbe480 | 2013-05-08 11:18:41 +0200 | [diff] [blame] | 237 | tests/ide-test$(EXESUF): tests/ide-test.o $(libqos-pc-obj-y) |
Paolo Bonzini | ff667e2 | 2012-12-21 09:45:20 +0100 | [diff] [blame] | 238 | tests/hd-geo-test$(EXESUF): tests/hd-geo-test.o |
Andreas Färber | 530a7e4 | 2013-06-26 15:52:16 +0200 | [diff] [blame] | 239 | tests/boot-order-test$(EXESUF): tests/boot-order-test.o $(libqos-obj-y) |
Michael S. Tsirkin | ad6423a | 2013-10-18 00:52:18 +0300 | [diff] [blame] | 240 | tests/acpi-test$(EXESUF): tests/acpi-test.o $(libqos-obj-y) |
Andreas Färber | cc9936a | 2013-05-02 15:56:26 +0200 | [diff] [blame] | 241 | tests/tmp105-test$(EXESUF): tests/tmp105-test.o $(libqos-omap-obj-y) |
Anthony Liguori | 9bda413 | 2013-04-16 09:45:19 -0500 | [diff] [blame] | 242 | tests/i440fx-test$(EXESUF): tests/i440fx-test.o $(libqos-pc-obj-y) |
Anthony Liguori | bf2a38d | 2013-04-16 09:45:21 -0500 | [diff] [blame] | 243 | tests/fw_cfg-test$(EXESUF): tests/fw_cfg-test.o $(libqos-pc-obj-y) |
Andreas Färber | a21baf7 | 2013-11-07 18:25:10 +0100 | [diff] [blame] | 244 | tests/e1000-test$(EXESUF): tests/e1000-test.o |
Andreas Färber | 74769fe | 2013-11-07 18:43:09 +0100 | [diff] [blame] | 245 | tests/rtl8139-test$(EXESUF): tests/rtl8139-test.o |
Andreas Färber | 85f68d5 | 2013-11-07 18:53:28 +0100 | [diff] [blame] | 246 | tests/pcnet-test$(EXESUF): tests/pcnet-test.o |
Andreas Färber | 92838a1 | 2013-11-07 19:18:46 +0100 | [diff] [blame] | 247 | tests/eepro100-test$(EXESUF): tests/eepro100-test.o |
Andreas Färber | 4a053e7 | 2013-11-07 18:37:34 +0100 | [diff] [blame] | 248 | tests/vmxnet3-test$(EXESUF): tests/vmxnet3-test.o |
Andreas Färber | 5297ea6 | 2014-02-09 04:01:37 +0100 | [diff] [blame] | 249 | tests/ne2000-test$(EXESUF): tests/ne2000-test.o |
Andreas Färber | 02063aa | 2014-02-09 04:39:47 +0100 | [diff] [blame] | 250 | tests/virtio-balloon-test$(EXESUF): tests/virtio-balloon-test.o |
Andreas Färber | c7a59be | 2014-02-09 04:32:55 +0100 | [diff] [blame] | 251 | tests/virtio-blk-test$(EXESUF): tests/virtio-blk-test.o |
Andreas Färber | b815ec5 | 2014-02-09 04:13:37 +0100 | [diff] [blame] | 252 | tests/virtio-net-test$(EXESUF): tests/virtio-net-test.o |
Andreas Färber | b6f46f0 | 2014-02-09 04:43:10 +0100 | [diff] [blame] | 253 | tests/virtio-rng-test$(EXESUF): tests/virtio-rng-test.o |
Andreas Färber | 26c9a01 | 2014-02-21 16:42:15 +0100 | [diff] [blame^] | 254 | tests/virtio-scsi-test$(EXESUF): tests/virtio-scsi-test.o |
Andreas Färber | 7649107 | 2014-02-09 03:48:44 +0100 | [diff] [blame] | 255 | tests/tpci200-test$(EXESUF): tests/tpci200-test.o |
Andreas Färber | 3714682 | 2014-02-09 12:24:15 +0100 | [diff] [blame] | 256 | tests/ipoctal232-test$(EXESUF): tests/ipoctal232-test.o |
Andreas Färber | 7c41f21 | 2013-07-29 05:44:47 +0200 | [diff] [blame] | 257 | tests/qom-test$(EXESUF): tests/qom-test.o |
Stefan Hajnoczi | 7ceeedd | 2013-10-30 14:54:34 +0100 | [diff] [blame] | 258 | tests/blockdev-test$(EXESUF): tests/blockdev-test.o $(libqos-pc-obj-y) |
Stefan Hajnoczi | 43cd209 | 2013-10-30 14:54:35 +0100 | [diff] [blame] | 259 | tests/qdev-monitor-test$(EXESUF): tests/qdev-monitor-test.o $(libqos-pc-obj-y) |
Wenchao Xia | f93296e | 2013-09-06 11:24:32 +0800 | [diff] [blame] | 260 | tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o |
Blue Swirl | d2a16f7 | 2012-03-30 17:39:33 +0000 | [diff] [blame] | 261 | |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 262 | # QTest rules |
| 263 | |
| 264 | TARGETS=$(patsubst %-softmmu,%, $(filter %-softmmu,$(TARGET_DIRS))) |
| 265 | QTEST_TARGETS=$(foreach TARGET,$(TARGETS), $(if $(check-qtest-$(TARGET)-y), $(TARGET),)) |
| 266 | check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS), $(check-qtest-$(TARGET)-y)) |
| 267 | |
Paolo Bonzini | 8a09070 | 2012-12-20 15:40:20 +0100 | [diff] [blame] | 268 | qtest-obj-y = tests/libqtest.o libqemuutil.a libqemustub.a |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 269 | $(check-qtest-y): $(qtest-obj-y) |
| 270 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 271 | .PHONY: check-help |
| 272 | check-help: |
| 273 | @echo "Regression testing targets:" |
| 274 | @echo |
| 275 | @echo " make check Run all tests" |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 276 | @echo " make check-qtest-TARGET Run qtest tests for given target" |
| 277 | @echo " make check-qtest Run qtest tests" |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 278 | @echo " make check-unit Run qobject tests" |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 279 | @echo " make check-qapi-schema Run QAPI schema tests" |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 280 | @echo " make check-block Run block tests" |
| 281 | @echo " make check-report.html Generates an HTML test report" |
Wenchao Xia | 2cdfb12 | 2013-09-26 08:42:56 +0800 | [diff] [blame] | 282 | @echo " make check-clean Clean the tests" |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 283 | @echo |
| 284 | @echo "Please note that HTML reports do not regenerate if the unit tests" |
| 285 | @echo "has not changed." |
| 286 | @echo |
| 287 | @echo "The variable SPEED can be set to control the gtester speed setting." |
| 288 | @echo "Default options are -k and (for make V=1) --verbose; they can be" |
| 289 | @echo "changed with variable GTESTER_OPTIONS." |
Paolo Bonzini | 2d7799f | 2012-02-09 11:21:03 +0100 | [diff] [blame] | 290 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 291 | SPEED = quick |
| 292 | GTESTER_OPTIONS = -k $(if $(V),--verbose,-q) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 293 | GCOV_OPTIONS = -n $(if $(V),-f,) |
Anthony Liguori | dbfe06c | 2012-01-10 13:10:43 -0600 | [diff] [blame] | 294 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 295 | # gtester tests, possibly with verbose output |
Anthony Liguori | dbfe06c | 2012-01-10 13:10:43 -0600 | [diff] [blame] | 296 | |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 297 | .PHONY: $(patsubst %, check-qtest-%, $(QTEST_TARGETS)) |
| 298 | $(patsubst %, check-qtest-%, $(QTEST_TARGETS)): check-qtest-%: $(check-qtest-y) |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 299 | $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,) |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 300 | $(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \ |
Stefan Hajnoczi | 0412960 | 2013-05-27 15:28:51 +0200 | [diff] [blame] | 301 | MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} \ |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 302 | gtester $(GTESTER_OPTIONS) -m=$(SPEED) $(check-qtest-$*-y),"GTESTER $@") |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 303 | $(if $(CONFIG_GCOV),@for f in $(gcov-files-$*-y); do \ |
| 304 | echo Gcov report for $$f:;\ |
| 305 | $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \ |
| 306 | done,) |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 307 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 308 | .PHONY: $(patsubst %, check-%, $(check-unit-y)) |
| 309 | $(patsubst %, check-%, $(check-unit-y)): check-%: % |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 310 | $(if $(CONFIG_GCOV),@rm -f *.gcda */*.gcda */*/*.gcda */*/*/*.gcda,) |
Stefan Hajnoczi | 0412960 | 2013-05-27 15:28:51 +0200 | [diff] [blame] | 311 | $(call quiet-command, \ |
| 312 | MALLOC_PERTURB_=$${MALLOC_PERTURB_:-$$((RANDOM % 255 + 1))} \ |
| 313 | gtester $(GTESTER_OPTIONS) -m=$(SPEED) $*,"GTESTER $*") |
Blue Swirl | 1d728c3 | 2012-05-01 18:45:39 +0000 | [diff] [blame] | 314 | $(if $(CONFIG_GCOV),@for f in $(gcov-files-$(subst tests/,,$*)-y); do \ |
| 315 | echo Gcov report for $$f:;\ |
| 316 | $(GCOV) $(GCOV_OPTIONS) $$f -o `dirname $$f`; \ |
| 317 | done,) |
Anthony Liguori | dbfe06c | 2012-01-10 13:10:43 -0600 | [diff] [blame] | 318 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 319 | # gtester tests with XML output |
| 320 | |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 321 | $(patsubst %, check-report-qtest-%.xml, $(QTEST_TARGETS)): check-report-qtest-%.xml: $(check-qtest-y) |
| 322 | $(call quiet-command,QTEST_QEMU_BINARY=$*-softmmu/qemu-system-$* \ |
| 323 | gtester -q $(GTESTER_OPTIONS) -o $@ -m=$(SPEED) $(check-qtest-$*-y),"GTESTER $@") |
| 324 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 325 | check-report-unit.xml: $(check-unit-y) |
| 326 | $(call quiet-command,gtester -q $(GTESTER_OPTIONS) -o $@ -m=$(SPEED) $^, "GTESTER $@") |
| 327 | |
| 328 | # Reports and overall runs |
| 329 | |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 330 | check-report.xml: $(patsubst %,check-report-qtest-%.xml, $(QTEST_TARGETS)) check-report-unit.xml |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 331 | $(call quiet-command,$(SRC_PATH)/scripts/gtester-cat $^ > $@, " GEN $@") |
| 332 | |
| 333 | check-report.html: check-report.xml |
| 334 | $(call quiet-command,gtester-report $< > $@, " GEN $@") |
Kevin Wolf | 8959449 | 2012-03-08 12:29:00 +0100 | [diff] [blame] | 335 | |
Kevin Wolf | b8c6f29 | 2012-03-09 13:37:40 +0100 | [diff] [blame] | 336 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 337 | # Other tests |
Kevin Wolf | b8c6f29 | 2012-03-09 13:37:40 +0100 | [diff] [blame] | 338 | |
Wenchao Xia | 22ee5a5 | 2013-09-26 08:42:55 +0800 | [diff] [blame] | 339 | QEMU_IOTESTS_HELPERS-$(CONFIG_LINUX) = tests/qemu-iotests/socket_scm_helper$(EXESUF) |
| 340 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 341 | .PHONY: check-tests/qemu-iotests-quick.sh |
Wenchao Xia | 22ee5a5 | 2013-09-26 08:42:55 +0800 | [diff] [blame] | 342 | check-tests/qemu-iotests-quick.sh: tests/qemu-iotests-quick.sh qemu-img$(EXESUF) qemu-io$(EXESUF) $(QEMU_IOTESTS_HELPERS-y) |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 343 | $< |
Kevin Wolf | b8c6f29 | 2012-03-09 13:37:40 +0100 | [diff] [blame] | 344 | |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 345 | .PHONY: check-tests/test-qapi.py |
| 346 | check-tests/test-qapi.py: tests/test-qapi.py |
| 347 | |
| 348 | .PHONY: $(patsubst %, check-%, $(check-qapi-schema-y)) |
| 349 | $(patsubst %, check-%, $(check-qapi-schema-y)): check-%.json: $(SRC_PATH)/%.json |
Markus Armbruster | d8039e5 | 2013-09-24 09:43:39 +0200 | [diff] [blame] | 350 | $(call quiet-command, PYTHONPATH=$(SRC_PATH)/scripts $(PYTHON) $(SRC_PATH)/tests/qapi-schema/test-qapi.py <$^ >$*.test.out 2>$*.test.err; echo $$? >$*.test.exit, " TEST $*.out") |
| 351 | @diff -q $(SRC_PATH)/$*.out $*.test.out |
| 352 | @diff -q $(SRC_PATH)/$*.err $*.test.err |
| 353 | @diff -q $(SRC_PATH)/$*.exit $*.test.exit |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 354 | |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 355 | # Consolidated targets |
| 356 | |
Wenchao Xia | 2cdfb12 | 2013-09-26 08:42:56 +0800 | [diff] [blame] | 357 | .PHONY: check-qapi-schema check-qtest check-unit check check-clean |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 358 | check-qapi-schema: $(patsubst %,check-%, $(check-qapi-schema-y)) |
Anthony Liguori | 49ee359 | 2012-03-28 15:42:05 +0200 | [diff] [blame] | 359 | check-qtest: $(patsubst %,check-qtest-%, $(QTEST_TARGETS)) |
Paolo Bonzini | b93b63f | 2012-03-28 15:42:01 +0200 | [diff] [blame] | 360 | check-unit: $(patsubst %,check-%, $(check-unit-y)) |
| 361 | check-block: $(patsubst %,check-%, $(check-block-y)) |
Markus Armbruster | 9862657 | 2013-07-27 17:41:53 +0200 | [diff] [blame] | 362 | check: check-qapi-schema check-unit check-qtest |
Wenchao Xia | 2cdfb12 | 2013-09-26 08:42:56 +0800 | [diff] [blame] | 363 | check-clean: |
| 364 | $(MAKE) -C tests/tcg clean |
| 365 | rm -rf $(check-unit-y) $(check-qtest-i386-y) $(check-qtest-x86_64-y) $(check-qtest-sparc64-y) $(check-qtest-sparc-y) tests/*.o $(QEMU_IOTESTS_HELPERS-y) |
| 366 | |
| 367 | clean: check-clean |
Eduardo Habkost | 14117c7 | 2012-07-18 14:22:27 -0300 | [diff] [blame] | 368 | |
Wenchao Xia | 22ee5a5 | 2013-09-26 08:42:55 +0800 | [diff] [blame] | 369 | # Build the help program automatically |
| 370 | |
| 371 | all: $(QEMU_IOTESTS_HELPERS-y) |
| 372 | |
Eduardo Habkost | 14117c7 | 2012-07-18 14:22:27 -0300 | [diff] [blame] | 373 | -include $(wildcard tests/*.d) |
Anthony Liguori | db2b550 | 2013-06-26 15:52:14 +0200 | [diff] [blame] | 374 | -include $(wildcard tests/libqos/*.d) |