ci: Enable tpm2 in fedora:coverage, instead of fedora:Werror

This would give a better coverage report for the new TPM2 code.

Signed-off-by: Daiki Ueno <dueno@src.gnome.org>
This commit is contained in:
Daiki Ueno 2021-08-12 19:18:47 +02:00
parent a804519e61
commit 4017d2ec51

View File

@ -3,7 +3,7 @@ stages:
- deploy - deploy
variables: variables:
DEPENDENCIES: dbus-x11 diffutils gcc gjs meson ninja-build python3-dbus python3-gobject redhat-rpm-config tpm2-tss-devel DEPENDENCIES: dbus-x11 diffutils gcc gjs meson ninja-build python3-dbus python3-gobject redhat-rpm-config
CPPCHECK_OPTIONS: "--enable=warning --enable=style --enable=performance --enable=portability --std=c99 --template='{id}:{file}:{line},{severity},{message}'" CPPCHECK_OPTIONS: "--enable=warning --enable=style --enable=performance --enable=portability --std=c99 --template='{id}:{file}:{line},{severity},{message}'"
fedora:Werror: fedora:Werror:
@ -13,19 +13,12 @@ fedora:Werror:
- dnf upgrade -y - dnf upgrade -y
- dnf install -y 'dnf-command(builddep)' - dnf install -y 'dnf-command(builddep)'
- dnf builddep -y libsecret - dnf builddep -y libsecret
- dnf install -y $DEPENDENCIES swtpm swtpm-tools tpm2-abrmd - dnf install -y $DEPENDENCIES
- dbus-uuidgen --ensure - dbus-uuidgen --ensure
script: script:
- export XDG_CONFIG_HOME=$HOME/.config - meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations
- /usr/share/swtpm/swtpm-create-user-config-files --root
- mkdir -p ${XDG_CONFIG_HOME}/mytpm1
- swtpm_setup --tpm2 --tpmstate $XDG_CONFIG_HOME/mytpm1 --createek --allow-signing --decryption --create-ek-cert --create-platform-cert --lock-nvram --overwrite --display
- swtpm socket --tpm2 --tpmstate dir=$XDG_CONFIG_HOME/mytpm1 --flags startup-clear --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --daemon
- eval `dbus-launch --sh-syntax`
- 'tpm2-abrmd --logger=stdout --tcti=swtpm: --session --allow-root --flush-all &'
- 'export TCTI=tabrmd:bus_type=session'
- meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations -Dtpm2=true
- meson compile -C _build - meson compile -C _build
- eval `dbus-launch --sh-syntax`
- meson test -C _build - meson test -C _build
artifacts: artifacts:
when: on_failure when: on_failure
@ -95,12 +88,20 @@ fedora:coverage:
- dnf upgrade -y - dnf upgrade -y
- dnf install -y 'dnf-command(builddep)' - dnf install -y 'dnf-command(builddep)'
- dnf builddep -y libsecret - dnf builddep -y libsecret
- dnf install -y $DEPENDENCIES swtpm swtpm-tools tpm2-abrmd tpm2-tss-devel
- dnf install -y $DEPENDENCIES lcov - dnf install -y $DEPENDENCIES lcov
- dbus-uuidgen --ensure - dbus-uuidgen --ensure
script: script:
- meson _build -Db_coverage=true - meson _build -Db_coverage=true -Dtpm2=true
- meson compile -C _build - meson compile -C _build
- eval `dbus-launch --sh-syntax` - eval `dbus-launch --sh-syntax`
- export XDG_CONFIG_HOME=$HOME/.config
- /usr/share/swtpm/swtpm-create-user-config-files --root
- mkdir -p ${XDG_CONFIG_HOME}/mytpm1
- swtpm_setup --tpm2 --tpmstate $XDG_CONFIG_HOME/mytpm1 --createek --allow-signing --decryption --create-ek-cert --create-platform-cert --lock-nvram --overwrite --display
- swtpm socket --tpm2 --tpmstate dir=$XDG_CONFIG_HOME/mytpm1 --flags startup-clear --ctrl type=tcp,port=2322 --server type=tcp,port=2321 --daemon
- 'tpm2-abrmd --logger=stdout --tcti=swtpm: --session --allow-root --flush-all &'
- 'export TCTI=tabrmd:bus_type=session'
- meson test -C _build - meson test -C _build
- ninja coverage-html -C _build - ninja coverage-html -C _build
coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/' coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/'