[Gnuk-users] New test suite in tests/

NIIBE Yutaka gniibe at fsij.org
Thu Oct 13 01:03:49 UTC 2016


On 10/12/2016 07:51 PM, NIIBE Yutaka wrote:
> So, I am trying to migrate those tests into another tests/ directory
> with Pytest.  In this migration, I am currently try to support Achim's
> original OpenPGP card as well.

The code is still not as clean, and it's a bit messy about the
abstraction of reader and card, but works for me.

The new test suite does not cover all of Gnuk tests in test/ (which
covers admin-less mode and key generation, etc.), but I think that
it is basic test set.

For now, it only supports:

	TPDU reader + Achim's original OpenPGP card
	Gnuk Token

... and I found a difference of Gnuk which will be soon fixed.

--------------------------------------------
gniibe at debian:~/work/gnuk/gnuk/tests py.test-3 -s
============================= test session starts
==============================
platform linux -- Python 3.5.2+, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /home/gniibe/work/gnuk/gnuk/tests, inifile:
collected 88 items

test_empty_card.py
Test start!
CCID device: Bus 001 Device 014
Reader: Gemplus USB GemPCPinpad SmartCard Reader
.........................
OpenPGP card version: 2.2
Card Manufacturer:   0000
Card serial:     000000e7
.
test_personalize_card.py ...............................................
test_personalize_reset_card.py ............
test_remove_keys_card.py ...

========================== 88 passed in 14.31 seconds
==========================
gniibe at debian:~/work/gnuk/gnuk/tests$ py.test-3 -s
============================= test session starts
==============================
platform linux -- Python 3.5.2+, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /home/gniibe/work/gnuk/gnuk/tests, inifile:
collected 88 items

test_empty_card.py
Test start!
CCID device: Bus 001 Device 014
Reader: Gemplus USB GemPCPinpad SmartCard Reader
.........................
OpenPGP card version: 2.0
Card Manufacturer:   0005
Card serial:     000010af
.
test_personalize_card.py ...............................................
test_personalize_reset_card.py ............
test_remove_keys_card.py ...

========================== 88 passed in 14.80 seconds
==========================
gniibe at debian:~/work/gnuk/gnuk/tests$ py.test-3 -s
============================= test session starts
==============================
platform linux -- Python 3.5.2+, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /home/gniibe/work/gnuk/gnuk/tests, inifile:
collected 88 items

test_empty_card.py
Test start!
CCID device: Bus 001 Device 015
Reader: German Privacy Foundation Crypto Stick v1.2
.........................
OpenPGP card version: 2.0
Card Manufacturer:   0005
Card serial:     000006aa
.
test_personalize_card.py ...............................................
test_personalize_reset_card.py ............
test_remove_keys_card.py ...

========================== 88 passed in 17.06 seconds
==========================
gniibe at debian:~/work/gnuk/gnuk/tests$ py.test-3 -s
============================= test session starts
==============================
platform linux -- Python 3.5.2+, pytest-3.0.2, py-1.4.31, pluggy-0.3.1
rootdir: /home/gniibe/work/gnuk/gnuk/tests, inifile:
collected 88 items

test_empty_card.py
Test start!
CCID device: Bus 001 Device 016
Reader: Free Software Initiative of Japan Gnuk Token
.........................
OpenPGP card version: 2.0
Card Manufacturer:   fffe
Card serial:     87021534
.
test_personalize_card.py ...............................................
test_personalize_reset_card.py ............
test_remove_keys_card.py ...

========================== 88 passed in 10.68 seconds
==========================
gniibe at debian:~/work/gnuk/gnuk/tests$
-- 



More information about the gnuk-users mailing list