Skip to content

Commit 3e28415

Browse files
strongX509tobiasbrunner
authored andcommitted
testing: Switch to Python 3
Both swidGenerator and strongTNC were migrated to Python 3. This allows to migrate all testing scripts to Python 3, too.
1 parent a5662e8 commit 3e28415

File tree

7 files changed

+11
-12
lines changed

7 files changed

+11
-12
lines changed

testing/scripts/build-baseimage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ INC=$INC,openssl,vim,sqlite3,conntrack,gdb,cmake,libltdl-dev,wget,gnupg,man-db
1919
INC=$INC,libboost-thread-dev,libboost-system-dev,git,iperf,htop,valgrind,strace
2020
INC=$INC,gnat,gprbuild,acpid,acpi-support-base,libldns-dev,libunbound-dev
2121
INC=$INC,dnsutils,libsoup2.4-dev,ca-certificates,unzip,libsystemd-dev
22-
INC=$INC,python,python-setuptools,python-dev,python-pip,apt-transport-https
23-
INC=$INC,libjson-c-dev,libxslt1-dev,libapache2-mod-wsgi,iptables-dev
22+
INC=$INC,python3,python3-setuptools,python3-dev,python3-pip,apt-transport-https
23+
INC=$INC,libjson-c-dev,libxslt1-dev,libapache2-mod-wsgi-py3,iptables-dev
2424
INC=$INC,libxerces-c-dev,libgcrypt20-dev,traceroute
2525
case "$BASEIMGSUITE" in
2626
jessie)

testing/scripts/recipes/011_botan.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ all: install
2323
@rm -f .$(PKG)-checkout-* && touch $@
2424

2525
.$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV)
26-
cd $(PKG) && python ./configure.py $(CONFIG_OPTS) && make -j $(NUM_CPUS)
26+
cd $(PKG) && python3 ./configure.py $(CONFIG_OPTS) && make -j $(NUM_CPUS)
2727
@rm -f .$(PKG)-built-* && touch $@
2828

2929
install: .$(PKG)-built-$(REV)

testing/scripts/recipes/013_strongswan.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,6 @@ build: configure
129129

130130
install: build
131131
cd $(BUILDDIR) && make -j install && \
132-
cd $(DIR)/src/libcharon/plugins/vici/python && python setup.py install
132+
cd $(DIR)/src/libcharon/plugins/vici/python && python3 setup.py install
133133
# for Python-based updown scripts
134-
pip install python-daemon
134+
pip3 install python-daemon

testing/scripts/recipes/014_swid_generator.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ $(TAR):
1717
@touch $@
1818

1919
install: .$(PKG)-unpacked-$(REV)
20-
cd $(DIR) && python setup.py install
20+
cd $(DIR) && python3 setup.py install

testing/scripts/recipes/015_strongTNC.mk

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/make
22

33
PKG = strongTNC
4-
REV = 0.9.9
4+
REV = 1.0
55
DIR = $(PKG)-$(REV)
66
ZIP = $(PKG)-$(REV).zip
77
SRC = https://github.com/strongswan/$(PKG)/archive/$(REV).zip
@@ -18,10 +18,9 @@ $(ZIP):
1818

1919
.$(PKG)-deps-$(REV): .$(PKG)-unpacked-$(REV)
2020
mkdir -p $(DEPS)
21-
pip download -d $(DEPS) -r $(DIR)/requirements.txt six
21+
pip3 download -d $(DEPS) -r $(DIR)/requirements.txt
2222
@touch $@
2323

2424
install: .$(PKG)-deps-$(REV)
25-
# six is required for djangorestframework-camel-case
26-
pip install --no-index --find-links=file://`pwd`/$(DEPS) -r $(DIR)/requirements.txt six
25+
pip3 install --no-index --find-links=file://`pwd`/$(DEPS) -r $(DIR)/requirements.txt
2726
cp -r $(DIR) /var/www/tnc && chgrp -R www-data /var/www/tnc && chmod g+sw /var/www/tnc

testing/tests/route-based/net2net-xfrmi-ike/hosts/sun/etc/strongswan.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ swanctl {
77
charon-systemd {
88
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac vici kernel-netlink socket-default
99
start-scripts {
10-
updown = /usr/bin/python /etc/updown.py
10+
updown = /usr/bin/python3 /etc/updown.py
1111
}
1212
}

testing/tests/route-based/net2net-xfrmi-ike/hosts/sun/etc/updown.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/usr/bin/env python3
22

33
import sys
44
import vici

0 commit comments

Comments
 (0)