qemucpumock.c 1.3 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
/*
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see
 * <http://www.gnu.org/licenses/>.
 */

#include <config.h>

P
Pavel Hrdina 已提交
19 20 21 22
#include <stdlib.h>

#include "conf/cpu_conf.h"
#include "cpu/cpu.h"
23
#include "qemu/qemu_capabilities.h"
24
#define __QEMU_CAPSPRIV_H_ALLOW__
25
#include "qemu/qemu_capspriv.h"
26
#undef __QEMU_CAPSPRIV_H_ALLOW__
P
Pavel Hrdina 已提交
27
#include "testutilshostcpus.h"
28
#include "virarch.h"
29 30 31


virCPUDefPtr
32
virQEMUCapsProbeHostCPUForEmulator(virArch hostArch ATTRIBUTE_UNUSED,
33 34 35
                                   virQEMUCapsPtr qemuCaps ATTRIBUTE_UNUSED,
                                   virDomainVirtType type ATTRIBUTE_UNUSED)
{
P
Pavel Hrdina 已提交
36
    const char *model = getenv("VIR_TEST_MOCK_FAKE_HOST_CPU");
37

P
Pavel Hrdina 已提交
38
    return testUtilsHostCpusGetDefForModel(model);
39
}