-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
75 lines (58 loc) · 1.85 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
language: generic
os: linux
dist: bionic
addons:
apt:
packages:
- pcscd
- pcsc-tools
- libpcsclite-dev
- docbook-xsl
- xsltproc
- help2man
- ant
- socat
- yubico-piv-tool
- opensc
- gcc
- openjdk-8-jdk
before_script:
- set -ex;
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64;
sudo update-alternatives --get-selections | grep ^java;
export PATH="/usr/lib/jvm/java-8-openjdk-amd64/bin/:$PATH";
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/;
env | grep -i openjdk;
git clone https://github.com/frankmorgner/vsmartcard.git;
cd vsmartcard/virtualsmartcard;
autoreconf -vis && ./configure && sudo make install;
cd $TRAVIS_BUILD_DIR;
sudo /etc/init.d/pcscd restart;
git clone https://github.com/martinpaljak/oracle_javacard_sdks.git;
export JC_SDKS=$PWD/oracle_javacard_sdks;
export JC_HOME=$JC_SDKS/jc305u3_kit;
export JC_CLASSIC_HOME=$JC_HOME;
git clone https://github.com/arekinath/jcardsim.git;
cd jcardsim;
mvn initialize && mvn clean install -DskipTests;
cd $TRAVIS_BUILD_DIR;
export JC_HOME=$JC_SDKS/jc304_kit;
ant dist;
sudo wget https://github.com/arekinath/pivy/releases/download/v0.7.1/pivy_0.7.1-1_amd64_bionic.deb;
sudo dpkg -i pivy_0.7.1-1_amd64_bionic.deb;
gem install minitest;
set +ex;
script:
- set -ex;
sudo systemctl stop pcscd.service pcscd.socket;
sudo /usr/sbin/pcscd -f &
PCSCD_PID=$!;
java -noverify -cp bin/:jcardsim/target/jcardsim-3.0.5-SNAPSHOT.jar com.licel.jcardsim.remote.VSmartCard test/jcardsim.cfg >/dev/null &
PID=$!;
sleep 5;
opensc-tool --card-driver default --send-apdu 80b80000120ba000000308000010000100050000020F0F7f;
opensc-tool -n;
./test/simulator-tests 'Virtual PCD 00 00';
kill -9 $PID;
sudo kill -9 $PCSCD_PID;
set +ex;