[4/5] Adapt zdtm for python3 compatibility

Submitted by Adrian Reber on May 14, 2018, 1:07 p.m.

Details

Message ID 1526303231-10750-5-git-send-email-adrian@lisas.de
State Accepted
Series "Series without cover letter"
Headers show

Commit Message

Adrian Reber May 14, 2018, 1:07 p.m.
From: Adrian Reber <areber@redhat.com>

As python3 imports are working a bit differently the structure of the
imported files needs to change. Instead of having symlinks to criu.py
and rpc_pb2.py which does not match the import structure just create
symlink to ../lib/py (like crit) to make zdtm usable again with the
python3 compatibility.

Signed-off-by: Adrian Reber <areber@redhat.com>
---
 test/criu.py    | 1 -
 test/pycriu     | 1 +
 test/rpc_pb2.py | 1 -
 test/zdtm.py    | 2 +-
 4 files changed, 2 insertions(+), 3 deletions(-)
 delete mode 120000 test/criu.py
 create mode 120000 test/pycriu
 delete mode 120000 test/rpc_pb2.py

Patch hide | download patch | download mbox

diff --git a/test/criu.py b/test/criu.py
deleted file mode 120000
index 6626084..0000000
--- a/test/criu.py
+++ /dev/null
@@ -1 +0,0 @@ 
-../lib/py/criu.py
\ No newline at end of file
diff --git a/test/pycriu b/test/pycriu
new file mode 120000
index 0000000..d13a879
--- /dev/null
+++ b/test/pycriu
@@ -0,0 +1 @@ 
+../lib/py/
\ No newline at end of file
diff --git a/test/rpc_pb2.py b/test/rpc_pb2.py
deleted file mode 120000
index 49648ae..0000000
--- a/test/rpc_pb2.py
+++ /dev/null
@@ -1 +0,0 @@ 
-../lib/py/rpc_pb2.py
\ No newline at end of file
diff --git a/test/zdtm.py b/test/zdtm.py
index 3c7b5a0..7cd5e78 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -20,7 +20,7 @@  import fcntl
 import errno
 import datetime
 import yaml
-import criu as crpc
+import pycriu as crpc
 
 os.chdir(os.path.dirname(os.path.abspath(__file__)))