ptimer-test: do not link to libqemustub.a/libqemuutil.a
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Sep 2017 14:18:42 +0000 (16:18 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 Sep 2017 14:19:39 +0000 (16:19 +0200)
This test provides its own mocks, so do not use the "standard"
stubs in libqemustub.a or the event loop implementation in
libqemuutil.a.

This is required on OS X, which otherwise brings in qemu-timer.o,
async.o and main-loop.o from libqemuutil.a.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/Makefile.include
tests/ptimer-test-stubs.c

index 59e027f6eab656b0b94a4a2082b8626ecf2b724b..194315475b9222a39b508b3b80c38f778e37a180 100644 (file)
@@ -618,7 +618,7 @@ tests/test-vmstate$(EXESUF): tests/test-vmstate.o \
 tests/test-timed-average$(EXESUF): tests/test-timed-average.o $(test-util-obj-y)
 tests/test-base64$(EXESUF): tests/test-base64.o \
        libqemuutil.a libqemustub.a
-tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o libqemustub.a
+tests/ptimer-test$(EXESUF): tests/ptimer-test.o tests/ptimer-test-stubs.o hw/core/ptimer.o
 
 tests/test-logging$(EXESUF): tests/test-logging.o $(test-util-obj-y)
 
index 8a1b0a336cfafa1b42fbf044a03399f066193c3d..ca5cc3b13bb3e5bcc22c3b42244f0685c2906384 100644 (file)
@@ -30,6 +30,10 @@ QEMUTimerListGroup main_loop_tlg;
 
 int64_t ptimer_test_time_ns;
 
+/* Do not artificially limit period - see hw/core/ptimer.c.  */
+int use_icount = 1;
+bool qtest_allowed;
+
 void timer_init_tl(QEMUTimer *ts,
                    QEMUTimerList *timer_list, int scale,
                    QEMUTimerCB *cb, void *opaque)