[libsecret: 1/2] Enable TPM emulator in CI




commit af55275eca66833e9573b1a5079a18db7bf937b2
Author: Dhanuka Warusadura <csx tuta io>
Date:   Wed Jul 7 09:45:21 2021 +0000

    Enable TPM emulator in CI

 .gitlab-ci.yml | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index bdc64ac..82881c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,11 +13,18 @@ fedora:Werror:
     - dnf upgrade -y
     - dnf install -y 'dnf-command(builddep)'
     - dnf builddep -y libsecret
-    - dnf install -y $DEPENDENCIES
+    - dnf install -y $DEPENDENCIES swtpm swtpm-tools tpm2-abrmd
     - dbus-uuidgen --ensure
   script:
-    - meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations
+    - 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
     - eval `dbus-launch --sh-syntax`
+    - 'tpm2-abrmd --logger=stdout --tcti=swtpm: --session --flush-all &'
+    - 'export TCTI=tabrmd:bus_type=session'
+    - meson _build -Dwerror=true -Dc_args=-Wno-error=deprecated-declarations
     - meson test -C _build
   artifacts:
     when: on_failure


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]