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