Skip to contentSkip to conversation

tests/tpm-tests: Use g_test_skip() to mark skipped tests

PATCH In review Thomas Huth 4 participants 4 messages Apr 24, 2019 – Apr 28, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/tpm-tests: Use g_test_skip() to mark skipped tests

Since we do not use gtester anymore (which had a bug here), we can now use g_test_skip() to mark skipped tests.

---
 tests/tpm-tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tpm-tests.c +1 -1
index 582ec0cfd4..e640777aa9 100644
@@ -22,7 +22,7 @@ static bool
 tpm_test_swtpm_skip(void)
 {
     if (!tpm_util_swtpm_has_tpm2()) {
-        g_test_message("swtpm not in PATH or missing --tpm2 support");
+        g_test_skip("swtpm not in PATH or missing --tpm2 support");
         return true;
     }
 
Signature · 1 line
2.21.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Thomas Huth

Since we do not use gtester anymore (which had a bug here), we can now use g_test_skip() to mark skipped tests.

Quoted 21 lines
---
 tests/tpm-tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tpm-tests.c +1 -2
index 582ec0cfd4..e640777aa9 100644
@@ -22,7 +22,7 @@ static bool
 tpm_test_swtpm_skip(void)
 {
     if (!tpm_util_swtpm_has_tpm2()) {
-        g_test_message("swtpm not in PATH or missing --tpm2 support");
+        g_test_skip("swtpm not in PATH or missing --tpm2 support");
         return true;
     }
 
--

2.21.0

Signature · 1 line
Marc-André Lureau
Reviewed-by on v1 1/1
#2 lore raw
In reply to Thomas Huth
Quoted 14 lines · Thomas Huth

Since we do not use gtester anymore (which had a bug here), we can now use g_test_skip() to mark skipped tests.

---
 tests/tpm-tests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/tpm-tests.c +0 -0
index 582ec0cfd4..e640777aa9 100644

tests/tpm-tests.c static bool · line 28

Quoted 8 lines
tests/tpm-tests.c +1 -1
@@ -22,7 +22,7 @@ static bool
 tpm_test_swtpm_skip(void)
 {
     if (!tpm_util_swtpm_has_tpm2()) {
-        g_test_message("swtpm not in PATH or missing --tpm2 support");
+        g_test_skip("swtpm not in PATH or missing --tpm2 support");
         return true;
     }
 
Reviewed-by on v1 1/1
#3 lore raw
In reply to Thomas Huth
Quoted 4 lines · Thomas Huth

Since we do not use gtester anymore (which had a bug here), we can now use g_test_skip() to mark skipped tests.

Quoted 17 lines
---
  tests/tpm-tests.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
tests/tpm-tests.c +1 -1
index 582ec0cfd4..e640777aa9 100644
@@ -22,7 +22,7 @@ static bool
  tpm_test_swtpm_skip(void)
  {
      if (!tpm_util_swtpm_has_tpm2()) {
-        g_test_message("swtpm not in PATH or missing --tpm2 support");
+        g_test_skip("swtpm not in PATH or missing --tpm2 support");
          return true;
      }