[reprotest] 01/01: Fix tests for the case where reprotest is not installed
Ximin Luo
infinity0 at debian.org
Wed Jul 19 15:33:06 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository reprotest.
commit c6eb22371a82b7c7c630aab4944c89798a8c3926
Author: Ximin Luo <infinity0 at debian.org>
Date: Wed Jul 19 17:32:21 2017 +0200
Fix tests for the case where reprotest is not installed
---
debian/import-autopkgtest.sh | 1 +
reprotest/virt/autopkgtest-virt-chroot | 2 +-
reprotest/virt/autopkgtest-virt-lxc | 2 +-
reprotest/virt/autopkgtest-virt-lxd | 2 +-
reprotest/virt/autopkgtest-virt-null | 2 +-
reprotest/virt/autopkgtest-virt-qemu | 2 +-
reprotest/virt/autopkgtest-virt-schroot | 2 +-
reprotest/virt/autopkgtest-virt-ssh | 2 +-
8 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/debian/import-autopkgtest.sh b/debian/import-autopkgtest.sh
index b3dcfc4..7f31cc8 100755
--- a/debian/import-autopkgtest.sh
+++ b/debian/import-autopkgtest.sh
@@ -13,6 +13,7 @@ ourpatch() {
for i in $lib_imports; do
sed -i -e 's/^import '"$i"'/from reprotest.lib import '"$i"'/g' "$1"
done
+ sed -i -e "s,'/usr/share/autopkgtest/lib',os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))),g" "$1"
}
last_import=$(git log --pretty="format:%H" --grep='Import autopkgtest')
diff --git a/reprotest/virt/autopkgtest-virt-chroot b/reprotest/virt/autopkgtest-virt-chroot
index af41054..348bbc9 100755
--- a/reprotest/virt/autopkgtest-virt-chroot
+++ b/reprotest/virt/autopkgtest-virt-chroot
@@ -26,7 +26,7 @@ import sys
import os
import argparse
-sys.path.insert(0, '/usr/share/autopkgtest/lib')
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))), 'lib'))
diff --git a/reprotest/virt/autopkgtest-virt-lxc b/reprotest/virt/autopkgtest-virt-lxc
index 512b9b2..38a5105 100755
--- a/reprotest/virt/autopkgtest-virt-lxc
+++ b/reprotest/virt/autopkgtest-virt-lxc
@@ -35,7 +35,7 @@ import tempfile
import shutil
import argparse
-sys.path.insert(0, '/usr/share/autopkgtest/lib')
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))), 'lib'))
diff --git a/reprotest/virt/autopkgtest-virt-lxd b/reprotest/virt/autopkgtest-virt-lxd
index ea83435..33427bf 100755
--- a/reprotest/virt/autopkgtest-virt-lxd
+++ b/reprotest/virt/autopkgtest-virt-lxd
@@ -32,7 +32,7 @@ import subprocess
import time
import argparse
-sys.path.insert(0, '/usr/share/autopkgtest/lib')
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))), 'lib'))
diff --git a/reprotest/virt/autopkgtest-virt-null b/reprotest/virt/autopkgtest-virt-null
index 5ac2aeb..5847fca 100755
--- a/reprotest/virt/autopkgtest-virt-null
+++ b/reprotest/virt/autopkgtest-virt-null
@@ -26,7 +26,7 @@ import sys
import os
import argparse
-sys.path.insert(0, '/usr/share/autopkgtest/lib')
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))), 'lib'))
diff --git a/reprotest/virt/autopkgtest-virt-qemu b/reprotest/virt/autopkgtest-virt-qemu
index 4488c69..1f4706c 100755
--- a/reprotest/virt/autopkgtest-virt-qemu
+++ b/reprotest/virt/autopkgtest-virt-qemu
@@ -37,7 +37,7 @@ import fcntl
import re
import argparse
-sys.path.insert(0, '/usr/share/autopkgtest/lib')
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))), 'lib'))
diff --git a/reprotest/virt/autopkgtest-virt-schroot b/reprotest/virt/autopkgtest-virt-schroot
index 9a62ac3..6a8adfb 100755
--- a/reprotest/virt/autopkgtest-virt-schroot
+++ b/reprotest/virt/autopkgtest-virt-schroot
@@ -31,7 +31,7 @@ import subprocess
import time
import argparse
-sys.path.insert(0, '/usr/share/autopkgtest/lib')
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))), 'lib'))
diff --git a/reprotest/virt/autopkgtest-virt-ssh b/reprotest/virt/autopkgtest-virt-ssh
index 062fb19..9f84111 100755
--- a/reprotest/virt/autopkgtest-virt-ssh
+++ b/reprotest/virt/autopkgtest-virt-ssh
@@ -36,7 +36,7 @@ import time
import subprocess
import socket
-sys.path.insert(0, '/usr/share/autopkgtest/lib')
+sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(
os.path.abspath(__file__))), 'lib'))
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/reprotest.git
More information about the Reproducible-commits
mailing list