Project

General

Profile

Bug #3376

create test scripts to verify pysim-prog ans sysmo-usim-tool with jenkins

Added by dexter 12 days ago. Updated 6 days ago.

Status:
In Progress
Priority:
Normal
Assignee:
Target version:
-
Start date:
07/04/2018
Due date:
% Done:

80%

Estimated time:
Spec Reference:

Description

At the moment pysim, nor sysmo-usim-tool does have integration tests on jenkins. Especially for pysim-prog.py this is a problem. pysim-prog.py supports various types of simcards now and its becoming hard to check every single one of them during development. We need a script that can automatically verify various card types.

The setup should consist of multiple physical cards and readers. The script then should execute a test write/read operation on each of the cards.

For sysmo-usim-tool the task is similar but with the exception that only one card type is checked and the script can be much simpler


Related issues

Related to pySim - Bug #3377: physical setup for automatic pySim tests against different cardsNew2018-07-04

History

#1 Updated by dexter 12 days ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

We now have a bash script to verify pysim-prog.py. The script isself is generic. The user has to supply a config file for each card (also scripts but with variables only). The script can then be used to generage a .ok file with pysim-read.py. The cards are automatically probed (see also: https://gerrit.osmocom.org/#/c/pysim/+/9884), so one does not pay too much attention on which card goes into which reader. Also -re enumeration of the readers by pcscd will not hurt.

#2 Updated by laforge 12 days ago

dexter wrote:

We now have a bash script to verify pysim-prog.py. The script isself is generic.

great!

The cards are automatically probed (see also: https://gerrit.osmocom.org/#/c/pysim/+/9884), so one does not pay too much attention on which card goes into which reader.

But I presume we do make sure that all expected cards are actually found? We just don't care in whcih slot they are? I'm just asking as the absence of an expected card from the system should cause the test to fail.

Also -re enumeration of the readers by pcscd will not hurt.

great.

#3 Updated by laforge 12 days ago

  • Related to Bug #3377: physical setup for automatic pySim tests against different cards added

#4 Updated by dexter 12 days ago

  • % Done changed from 50 to 80

But I presume we do make sure that all expected cards are actually found? We just don't care in whcih slot they are? I'm just asking as the absence of an expected card from the system should >cause the test to fail.

Thats a good point. I have now added that. If it does not see each expected card once it will exit with 1. Also if a card becomes unresponsive the script will exit with 1.

For sysmo-usim-tool I now have a script that tries out each of the commandline options. I have set -e on here as well, so if sysmo-usim-tool detects an error it will fail. We also might consider to dump the output into an .ok file and diff afterwards. Then we also can verify the actual data contents as well.

All in all I think we have a good coverage now. I will coordninate the jenkins integration with lynxis when I see him next time.

(I also have extended sysmo-usim-tool a bit so that it senses on the ATR of the card. By this we make sure that we always pick the first available sysmo-usim-sjs1 even when various readers with various other cards are connected)

#5 Updated by dexter 6 days ago

I have discussed the next steps with lynxis today. As a first step I have pushed the pysim-test.sh script I have created into review so it can checked out together with the repository and also be used by other developers if needed. Lynxis will take care of the jenkins stuff (contrib directory).

See also: https://gerrit.osmocom.org/#/c/pysim/+/9947 tests: add test program to verify pysim-prog.py (and pysim-read.py)

I now negotiate with Roh to get a debian host where we can run the build slave on.

(Also I changed the script a bit so that it can be run from any location.)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)