mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
make: remove checks for python 2 binary
This commit removes the checks for the Python 2 binary in the makefile and makes sure that ZDTM tests always use python3. Since support for Python 2 has been dropped, these checks are no longer needed. Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
This commit is contained in:
parent
642fd99bfd
commit
ede018176c
32 changed files with 31 additions and 44 deletions
|
|
@ -12,11 +12,9 @@ endif
|
|||
|
||||
FOOTER := footer.txt
|
||||
SRC1 += crit.txt
|
||||
ifeq ($(PYTHON),python3)
|
||||
SRC1 += criu-ns.txt
|
||||
endif
|
||||
SRC1 += compel.txt
|
||||
SRC1 += criu-amdgpu-plugin.txt
|
||||
SRC1 += criu-amdgpu-plugin.txt
|
||||
SRC8 += criu.txt
|
||||
SRC := $(SRC1) $(SRC8)
|
||||
XMLS := $(patsubst %.txt,%.xml,$(SRC))
|
||||
|
|
|
|||
|
|
@ -145,10 +145,8 @@ install: $(obj)/criu
|
|||
$(Q) install -m 644 $(UAPI_HEADERS) $(DESTDIR)$(INCLUDEDIR)/criu/
|
||||
$(Q) mkdir -p $(DESTDIR)$(LIBEXECDIR)/criu/scripts
|
||||
$(Q) install -m 755 scripts/systemd-autofs-restart.sh $(DESTDIR)$(LIBEXECDIR)/criu/scripts
|
||||
ifeq ($(PYTHON),python3)
|
||||
$(E) " INSTALL " scripts/criu-ns
|
||||
$(Q) install -m 755 scripts/criu-ns $(DESTDIR)$(SBINDIR)
|
||||
endif
|
||||
.PHONY: install
|
||||
|
||||
uninstall:
|
||||
|
|
|
|||
|
|
@ -20,13 +20,10 @@ REQ-DEB-PKG-NAMES += libcap-dev
|
|||
REQ-DEB-PKG-TEST-NAMES += $(PYTHON)-yaml
|
||||
REQ-DEB-PKG-TEST-NAMES += libaio-dev
|
||||
|
||||
ifeq ($(PYTHON),python3)
|
||||
REQ-DEB-PKG-TEST-NAMES += libaio-dev
|
||||
|
||||
REQ-RPM-PKG-TEST-NAMES += $(PYTHON)-PyYAML
|
||||
else
|
||||
REQ-RPM-PKG-TEST-NAMES += $(PYTHON)-pyyaml
|
||||
endif
|
||||
|
||||
|
||||
export LIBS += -lprotobuf-c -ldl -lnl-3 -lsoccr -Lsoccr/ -lnet
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ RUN apt-install \
|
|||
pkg-config \
|
||||
protobuf-c-compiler \
|
||||
protobuf-compiler \
|
||||
python-is-python3 \
|
||||
python3-minimal \
|
||||
python3-protobuf \
|
||||
python3-yaml
|
||||
|
|
|
|||
|
|
@ -58,10 +58,6 @@ ci_prep () {
|
|||
|
||||
scripts/ci/apt-install "${CI_PKGS[@]}"
|
||||
chmod a+x "$HOME"
|
||||
|
||||
# zdtm uses an unversioned python binary to run the tests.
|
||||
# let's point python to python3
|
||||
ln -sf /usr/bin/python3 /usr/bin/python
|
||||
}
|
||||
|
||||
test_stream() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import ctypes
|
||||
import ctypes.util
|
||||
import errno
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/env python2
|
||||
#!/bin/env python3
|
||||
import sys
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ MAKE := make
|
|||
MKDIR := mkdir -p
|
||||
AWK := awk
|
||||
PERL := perl
|
||||
FULL_PYTHON := $(shell which python3 2>/dev/null || which python2 2>/dev/null)
|
||||
FULL_PYTHON := $(shell which python3 2>/dev/null)
|
||||
PYTHON ?= $(shell basename $(FULL_PYTHON))
|
||||
FIND := find
|
||||
SH := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
|
||||
|
|
|
|||
|
|
@ -21,7 +21,6 @@ tcp-conn-v6: tcp-conn-v6.c
|
|||
test: tcp-constructor tcp-conn tcp-conn-v6
|
||||
unshare -n sh -c "ip link set up dev lo; ./tcp-conn"
|
||||
unshare -n sh -c "ip link set up dev lo; ./tcp-conn-v6"
|
||||
python run.py ./$(RUN)
|
||||
python3 run.py ./$(RUN)
|
||||
|
||||
.PHONY: test
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys, os
|
||||
import hashlib
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import pycriu
|
||||
import sys
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import ctypes
|
||||
libc = ctypes.CDLL(None)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import fcntl
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import subprocess
|
||||
import os, sys, time, signal, pty
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
set -e -x
|
||||
|
||||
# construct root
|
||||
python ../../zdtm.py run -t zdtm/static/env00 --iter 0 -f ns
|
||||
python3 ../../zdtm.py run -t zdtm/static/env00 --iter 0 -f ns
|
||||
|
||||
truncate -s 0 zdtm.loop
|
||||
truncate -s 50M zdtm.loop
|
||||
|
|
@ -11,7 +11,7 @@ dev=`losetup --find --show zdtm.loop`
|
|||
mkdir -p ../../dev
|
||||
cp -ap $dev ../../dev
|
||||
export ZDTM_MNT_EXT_DEV=$dev
|
||||
python ../../zdtm.py run $EXTRA_OPTS -t zdtm/static/mnt_ext_dev || ret=$?
|
||||
python3 ../../zdtm.py run $EXTRA_OPTS -t zdtm/static/mnt_ext_dev || ret=$?
|
||||
losetup -d $dev
|
||||
unlink zdtm.loop
|
||||
exit $ret
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ for i in `awk '{ print $2 }' < /proc/self/mounts`; do
|
|||
umount -l $i
|
||||
done
|
||||
|
||||
python mounts.py
|
||||
python3 mounts.py
|
||||
kill $INMNTNS_PID
|
||||
while :; do
|
||||
sleep 10
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ all: test-c rpc_pb2.py criu
|
|||
CFLAGS += -g -Werror -Wall -I.
|
||||
LDLIBS += -lprotobuf-c
|
||||
|
||||
PYTHON ?= python
|
||||
PYTHON ?= python3
|
||||
|
||||
run: all
|
||||
@make -C .. loop
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import argparse
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
# Test criu errno
|
||||
|
||||
import socket, os, errno
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import socket, os, sys, errno
|
||||
import rpc_pb2 as rpc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import socket, os, sys
|
||||
import rpc_pb2 as rpc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import socket, os, sys
|
||||
import rpc_pb2 as rpc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/python
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys
|
||||
import rpc_pb2 as rpc
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import os, pty, sys, subprocess
|
||||
import termios, fcntl, time
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import os
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import fcntl
|
||||
import tempfile
|
||||
import struct
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import socket
|
||||
import time
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import subprocess
|
||||
import socket
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
import sys
|
||||
|
||||
sys.path.append("../crit")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue