diff mbox series

[PULL,39/51] ptimer-test: do not link to libqemustub.a/libqemuutil.a

Message ID 20170919142758.13577-2-pbonzini@redhat.com
State New
Headers show
Series None | expand

Commit Message

Paolo Bonzini Sept. 19, 2017, 2:27 p.m. UTC
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    | 2 +-
 tests/ptimer-test-stubs.c | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/Makefile.include b/tests/Makefile.include
index 59e027f6ea..194315475b 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -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)
 
diff --git a/tests/ptimer-test-stubs.c b/tests/ptimer-test-stubs.c
index 8a1b0a336c..ca5cc3b13b 100644
--- a/tests/ptimer-test-stubs.c
+++ b/tests/ptimer-test-stubs.c
@@ -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)