libvirt.sh 4.6 KB
Newer Older
T
initail  
tracedeng 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
#!/bin/bash
sudo yum install -y \
  gdb \
  make \
  audit-libs-devel \
  augeas \
  autoconf \
  automake \
  bash-completion \
  cyrus-sasl-devel \
  dbus-devel \
  device-mapper-devel \
  dnsmasq \
  ebtables \
  firewalld-filesystem \
  gawk \
  gcc \
  gettext \
  gettext-devel \
  git \
  glib2-devel \
  glusterfs-api-devel \
  glusterfs-devel \
  gnutls-devel \
  iptables \
  iscsi-initiator-utils \
  libacl-devel \
  libattr-devel \
  libblkid-devel \
  libcap-ng-devel \
  libiscsi-devel \
  libnl3-devel \
  libpcap-devel \
  libpciaccess-devel \
  librados-devel \
  librbd-devel \
  libselinux-devel \
  libssh-devel \
  libssh2-devel \
  libtasn1-devel \
  libtirpc-devel \
  libtool \
  libxml2-devel \
  libxslt \
  lvm2 \
  module-init-tools \
  ncurses-devel \
  netcf-devel \
  nfs-utils \
  numactl-devel \
  numad \
  parted-devel \
  perl-interpreter \
  polkit \
  python3 \
  python3-docutils \
  qemu-img \
  radvd \
  readline-devel \
  rpcgen \
  sanlock-devel \
  scrub \
  systemd-devel \
  systemd-units \
  systemtap-sdt-devel \
  util-linux \
  wireshark-devel \
  xfsprogs-devel \
  yajl-devel \
  --downloadonly --downloaddir=./ --allowerasing --skip-broken --nobest
sudo rpm -ivh --force --nodeps *.rpm

cd ${repo}
git submodule update --init
autoreconf --verbose --force --install

mkdir x86_64-openEuler-linux-gnu
cd x86_64-openEuler-linux-gnu

../configure \
  --build=x86_64-openEuler-linux-gnu \
  --host=x86_64-openEuler-linux-gnu \
  --program-prefix= \
  --disable-dependency-tracking \
  --prefix=/usr \
  --exec-prefix=/usr \
  --bindir=/usr/bin \
  --sbindir=/usr/sbin \
  --sysconfdir=/etc \
  --datadir=/usr/share \
  --includedir=/usr/include \
  --libdir=/usr/lib64 \
  --libexecdir=/usr/libexec \
  --localstatedir=/var \
  --sharedstatedir=/var/lib \
  --mandir=/usr/share/man \
  --infodir=/usr/share/info \
  --enable-dependency-tracking \
  --with-runstatedir=/run \
  --with-qemu \
  --without-openvz \
  --without-lxc \
  --without-vbox \
  --without-libxl \
  --with-sasl \
  --with-polkit \
  --with-libvirtd \
  --without-esx \
  --without-hyperv \
  --without-vmware \
  --without-vz \
  --without-bhyve \
  --with-remote-default-mode=legacy \
  --with-interface \
  --with-network \
  --with-storage-fs \
  --with-storage-lvm \
  --with-storage-iscsi \
  --with-storage-iscsi-direct \
  --with-storage-scsi \
  --with-storage-disk \
  --with-storage-mpath \
  --with-storage-rbd \
  --without-storage-sheepdog \
  --with-storage-gluster \
  --without-storage-zfs \
  --without-storage-vstorage \
  --with-numactl \
  --with-numad \
  --with-capng \
  --without-fuse \
  --with-netcf \
  --with-selinux \
  --with-selinux-mount=/sys/fs/selinux \
  --without-apparmor \
  --without-hal \
  --with-udev \
  --with-yajl \
  --with-sanlock \
  --with-libpcap \
  --with-macvtap \
  --with-audit \
  --with-dtrace \
  --with-driver-modules \
  --with-firewalld \
  --with-firewalld-zone \
  --with-wireshark-dissector \
  --without-pm-utils \
  --with-nss-plugin \
  '--with-packager=http://openeuler.org, 2020-08-20-11:11:11, ' \
  --with-packager-version=7.oe1 \
  --with-qemu-user=qemu \
  --with-qemu-group=qemu \
  --with-tls-priority=@LIBVIRT,SYSTEM \
  --with-loader-nvram=/usr/share/edk2.git/ovmf-x64/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-x64/OVMF_VARS-pure-efi.fd:/usr/share/edk2.git/ovmf-ia32/OVMF_CODE-pure-efi.fd:/usr/share/edk2.git/ovmf-ia32/OVMF_VARS-pure-efi.fd:/usr/share/edk2.git/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2.git/aarch64/vars-template-pflash.raw:/usr/share/edk2.git/arm/QEMU_EFI-pflash.raw:/usr/share/edk2.git/arm/vars-template-pflash.raw:/usr/share/edk2/ovmf/OVMF_CODE.fd:/usr/share/edk2/ovmf/OVMF_VARS.fd:/usr/share/edk2/ovmf-ia32/OVMF_CODE.fd:/usr/share/edk2/ovmf-ia32/OVMF_VARS.fd:/usr/share/edk2/aarch64/QEMU_EFI-pflash.raw:/usr/share/edk2/aarch64/vars-template-pflash.raw:/usr/share/edk2/arm/QEMU_EFI-pflash.raw:/usr/share/edk2/arm/vars-template-pflash.raw \
  --enable-werror \
  --enable-expensive-tests \
  --with-init-script=systemd \
  --without-login-shell || (cat config.log; exit 1)

make -j$(getconf _NPROCESSORS_ONLN) V=1
sed -i 's/while (kill(pid, 0) != -1)/for (int i = 0; kill(pid, 0) != -1 \&\& i < 300; i++)/' ../tests/commandtest.c
sed -i 's/while (kill(pid, SIGINT) != -1)/for (int i = 0; kill(pid, SIGINT) != -1 \&\& i < 300; i++)/' ../tests/commandtest.c
(set +x; for((i=0;i<3;i++)); do sleep 30; ps -fC make &>/dev/null || break; ps ww -e f; ps ww -ef | awk '$9~"tests/.libs/lt-commandtest"{print$2}' | xargs -n 1 pstack; done) &
timeout 120 make -j$(getconf _NPROCESSORS_ONLN) check VIR_TEST_DEBUG=1 || (cat tests/test-suite.log; exit 1)