[diffoscope] 01/01: test_dtb: Add versioned dependency on fdtdump/device-tree-compiler (>= 1.4.2).
Vagrant Cascadian
vagrant at moszumanska.debian.org
Mon Apr 24 23:54:32 CEST 2017
This is an automated email from the git hooks/post-receive script.
vagrant pushed a commit to branch experimental
in repository diffoscope.
commit 52494a2b32062cf4ac106d4ed0e6c439218c8812
Author: Vagrant Cascadian <vagrant at debian.org>
Date: Mon Apr 24 14:53:39 2017 -0700
test_dtb: Add versioned dependency on fdtdump/device-tree-compiler (>=
1.4.2).
---
debian/control | 2 +-
tests/comparators/test_dtb.py | 9 +++++++--
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/debian/control b/debian/control
index e3cbc55..5ff978f 100644
--- a/debian/control
+++ b/debian/control
@@ -19,7 +19,7 @@ Build-Depends:
dh-python (>= 2.20160818~),
docx2txt <!nocheck>,
dpkg-dev (>= 1.17.14),
- device-tree-compiler <!nocheck>,
+ device-tree-compiler (>= 1.4.2) <!nocheck>,
enjarify <!nocheck>,
fontforge-extras <!nocheck>,
fp-utils <!nocheck>,
diff --git a/tests/comparators/test_dtb.py b/tests/comparators/test_dtb.py
index 1443fea..f23e24b 100644
--- a/tests/comparators/test_dtb.py
+++ b/tests/comparators/test_dtb.py
@@ -19,19 +19,24 @@
# along with diffoscope. If not, see <https://www.gnu.org/licenses/>.
import pytest
+import subprocess
from diffoscope.config import Config
from diffoscope.comparators.dtb import DeviceTreeFile
from diffoscope.comparators.missing_file import MissingFile
from utils.data import load_fixture, get_data
-from utils.tools import skip_unless_tools_exist
+from utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least
# Generated by: dtc --in-format=dts --out-format=dtb --out=devicetree1.dtb devicetree1.dts
dtb1 = load_fixture('devicetree1.dtb')
# Generated by: dtc --in-format=dts --out-format=dtb --out=devicetree2.dtb devicetree2.dts
dtb2 = load_fixture('devicetree2.dtb')
+def fdtdump_version():
+ out = subprocess.check_output(('fdtdump', '--version'), stderr=subprocess.STDOUT)
+ return out.decode().split()[2]
+
def test_identification(dtb1):
assert isinstance(dtb1, DeviceTreeFile)
@@ -43,7 +48,7 @@ def test_no_differences(dtb1):
def differences(dtb1, dtb2):
return dtb1.compare(dtb2).details
- at skip_unless_tools_exist('fdtdump')
+ at skip_unless_tool_is_at_least('fdtdump', fdtdump_version, '1.4.2')
def test_diff(differences):
expected_diff = get_data('devicetree_expected_diff')
assert differences[0].unified_diff == expected_diff
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git
More information about the diffoscope
mailing list