diff --git a/jobs/openeuler_qemu.yaml b/jobs/openeuler_qemu.yaml index 3f907028926a832d61a147bb9658ee283a803313..4dcbe9e28d3ba4822ff5336d71bbaff78da698ae 100644 --- a/jobs/openeuler_qemu.yaml +++ b/jobs/openeuler_qemu.yaml @@ -2,6 +2,7 @@ suite: openeuler_qemu category: functional openEuler_qemu: - repo_name: qemu - repo_url: https://gitee.com/openeuler/qemu.git - repo_branch: master + repo_name: qemu + repo_url: https://gitee.com/openeuler/qemu.git + repo_branch: master + san: enable diff --git a/tests/openeuler_qemu b/tests/openeuler_qemu index b1f53fce8ef20eb109e100b8d26e4260d8dc1cb0..6f3e8ab74def046a5ce3ce4e74a76d9847748bb8 100755 --- a/tests/openeuler_qemu +++ b/tests/openeuler_qemu @@ -60,6 +60,7 @@ depends_install() { usbredir-devel \ virglrenderer-devel \ zlib-devel \ + libasan \ --downloadonly --downloaddir=./qemu_depends sudo rpm -ivh --force --nodeps ./qemu_depends/*.rpm } @@ -67,7 +68,7 @@ depends_install() { build() { git clone $repo_url cd $repo_name - git checkout -f $branch + git checkout -f $repo_branch git submodule update --init ui/keycodemapdb if [ "$arch" = "aarch64" ]; then @@ -86,10 +87,18 @@ build() { disable_bluez="" fi + if [ x$san == x"enable" ];then + enable_san="--enable-sanitizers" + concurrency=60 + else + enable_san="" + concurrency=$(getconf _NPROCESSORS_ONLN) + fi + ../configure \ --prefix=/usr \ ${target_list} \ - '--extra-cflags=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/openEuler/openEuler-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIE -DPIE -fPIC' \ + '--extra-cflags=-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/openEuler/openEuler-hardened-cc1 -fasynchronous-unwind-tables -fstack-clash-protection -fPIE -DPIE -fPIC -Wno-error' \ '--extra-ldflags=-Wl,--build-id -pie -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack' \ --datadir=/usr/share \ --docdir=/usr/share/doc/qemu \ @@ -128,9 +137,10 @@ build() { --disable-sheepdog \ --disable-capstone \ --disable-smartcard \ + ${enable_san} \ || (cat config.log; exit 1) - make -j $(getconf _NPROCESSORS_ONLN) VL_LDFLAGS=-Wl,--build-id V=1 + make -j ${concurrency} VL_LDFLAGS=-Wl,--build-id V=1 make check V=1 }