diff options
author | Remi Collet <remi@remirepo.net> | 2020-03-13 10:40:02 +0100 |
---|---|---|
committer | Remi Collet <remi@remirepo.net> | 2020-03-13 10:40:02 +0100 |
commit | c61d69885ee01c881479f9afcdbe79af8af14545 (patch) | |
tree | 1f304ed3353d3f3f6f8d19288e061cb161dc9ad2 | |
parent | 4f467f39aeb02bb2a2f2df9c7a697601aca84db8 (diff) |
skip test (kernel not installed in mock build)
-rw-r--r-- | tests/007-rpmdbinfo.phpt | 12 | ||||
-rw-r--r-- | tests/009-rpmdbinfo2.phpt | 22 |
2 files changed, 23 insertions, 11 deletions
diff --git a/tests/007-rpmdbinfo.phpt b/tests/007-rpmdbinfo.phpt index c568dd9..e931c94 100644 --- a/tests/007-rpmdbinfo.phpt +++ b/tests/007-rpmdbinfo.phpt @@ -1,19 +1,11 @@ --TEST-- -Check for rpmdbinfo function +Check for rpmdbinfo function on Name --SKIPIF-- <?php if (!extension_loaded("rpminfo")) print "skip"; ?> --FILE-- <?php var_dump(rpmdbinfo('doesntexistsinrpmdb')); var_dump(rpmdbinfo('bash')); - -$k = rpmdbinfo('kernel'); -var_dump(count($k) > 0); // multiple kernels -$n = $k[0]['Name'] . '-' . $k[0]['Version'] . '-' . $k[0]['Release']; - -$k = rpmdbinfo($n); // single kernel with NEVR -var_dump(count($k) ==1); - ?> Done --EXPECTF-- @@ -33,6 +25,4 @@ array(1) { string(%d) "%s" } } -bool(true) -bool(true) Done diff --git a/tests/009-rpmdbinfo2.phpt b/tests/009-rpmdbinfo2.phpt new file mode 100644 index 0000000..23f95c5 --- /dev/null +++ b/tests/009-rpmdbinfo2.phpt @@ -0,0 +1,22 @@ +--TEST-- +Check for rpmdbinfo function on NEVR +--SKIPIF-- +<?php +if (!extension_loaded("rpminfo")) print "skip"; +if (!rpmdbinfo('kernel')) print "skip kernel not installed"; +?> +--FILE-- +<?php +$k = rpmdbinfo('kernel'); +var_dump(count($k) > 0); // multiple kernels +$n = $k[0]['Name'] . '-' . $k[0]['Version'] . '-' . $k[0]['Release']; + +$k = rpmdbinfo($n); // single kernel with NEVR +var_dump(count($k) ==1); + +?> +Done +--EXPECTF-- +bool(true) +bool(true) +Done |