New upstream release
* Update symbols file * Drop all patches, including one that was previously considered to be Debian-specific (moving to Python 3 for tests) * d/copyright: Update
This commit is contained in:
1 parent
0325b1302c
commit
667769f6a4
10 files changed
+12
-224
No files matched your search
-49
@@ -1,49 +0,0 @@
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Wed, 17 Jan 2018 14:07:32 +0000
|
||||
Subject: Use Python 3 for tests
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Closes: #1463
|
||||
Approved by: cgwalters
|
||||
Forwarded: https://github.com/ostreedev/ostree/pull/1463
|
||||
[smcv: Remove ci/* changes: those files are not in tarball releases]
|
||||
Applied-upstream: 2018.3, commit:971265e4e48f2ff512633b27c90569315ff168ff
|
||||
---
|
||||
tests/bootloader-entries-crosscheck.py | 2 +-
|
||||
tests/test-basic-user-only.sh | 2 +-
|
||||
tests/test-concurrency.py | 2 +-
|
||||
3 files changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/bootloader-entries-crosscheck.py b/tests/bootloader-entries-crosscheck.py
|
||||
index 5faa548..41f6956 100755
|
||||
--- a/tests/bootloader-entries-crosscheck.py
|
||||
+++ b/tests/bootloader-entries-crosscheck.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
# Copyright (C) 2015 Red Hat
|
||||
#
|
||||
diff --git a/tests/test-basic-user-only.sh b/tests/test-basic-user-only.sh
|
||||
index bea7b77..5f27014 100755
|
||||
--- a/tests/test-basic-user-only.sh
|
||||
+++ b/tests/test-basic-user-only.sh
|
||||
@@ -28,7 +28,7 @@ extra_basic_tests=5
|
||||
. $(dirname $0)/basic-test.sh
|
||||
|
||||
$CMD_PREFIX ostree --version > version.yaml
|
||||
-python -c 'import yaml; yaml.safe_load(open("version.yaml"))'
|
||||
+python3 -c 'import yaml; yaml.safe_load(open("version.yaml"))'
|
||||
echo "ok yaml version"
|
||||
|
||||
# Reset things so we don't inherit a lot of state from earlier tests
|
||||
diff --git a/tests/test-concurrency.py b/tests/test-concurrency.py
|
||||
index 3a0ce10..3ec3681 100755
|
||||
--- a/tests/test-concurrency.py
|
||||
+++ b/tests/test-concurrency.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (C) 2017 Colin Walters <walters@verbum.org>
|
||||
#
|
||||
Vendored
-5
@@ -1,5 +0,0 @@
|
||||
test-concurrency-Use-Python-3-syntax-for-octal.patch
|
||||
test-concurrency-Replace-range-with-xrange.patch
|
||||
test-concurrency-Explicitly-use-floor-division.patch
|
||||
tests-bootloader-entries-crosscheck-Use-Python-3-friendly.patch
|
||||
Use-Python-3-for-tests.patch
|
||||
@@ -1,52 +0,0 @@
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Wed, 17 Jan 2018 15:03:59 +0000
|
||||
Subject: test-concurrency: Explicitly use floor division
|
||||
|
||||
Python 3 is pickier about this. Python 2.7 has Python 3-compatible
|
||||
semantics for division when the division feature is imported from the
|
||||
future.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Applied-upstream: 2018.3, commit:98b597b465a556f3ad5b16478d7edee3037fbd4d
|
||||
---
|
||||
tests/test-concurrency.py | 9 +++++----
|
||||
1 file changed, 5 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/tests/test-concurrency.py b/tests/test-concurrency.py
|
||||
index f16f696..3a0ce10 100755
|
||||
--- a/tests/test-concurrency.py
|
||||
+++ b/tests/test-concurrency.py
|
||||
@@ -17,6 +17,7 @@
|
||||
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
||||
# Boston, MA 02111-1307, USA.
|
||||
|
||||
+from __future__ import division
|
||||
from __future__ import print_function
|
||||
import os
|
||||
import sys
|
||||
@@ -78,12 +79,12 @@ def run(n_committers, n_pruners):
|
||||
pruners = set()
|
||||
|
||||
print('n_committers', n_committers, 'n_pruners', n_pruners, file=sys.stderr)
|
||||
- n_trees = n_committers / 2
|
||||
+ n_trees = n_committers // 2
|
||||
for v in range(n_trees):
|
||||
mktree('tree{}'.format(v))
|
||||
|
||||
for v in range(n_committers):
|
||||
- committers.add(commit(v / 2))
|
||||
+ committers.add(commit(v // 2))
|
||||
for v in range(n_pruners):
|
||||
pruners.add(prune())
|
||||
|
||||
@@ -101,8 +102,8 @@ def run(n_committers, n_pruners):
|
||||
shutil.rmtree('tree{}'.format(v))
|
||||
|
||||
# No concurrent pruning
|
||||
-run(cpu_count()/2 + 2, 0)
|
||||
+run(cpu_count() // 2 + 2, 0)
|
||||
print("ok no concurrent prunes")
|
||||
|
||||
-run(cpu_count()/2 + 4, 3)
|
||||
+run(cpu_count() // 2 + 4, 3)
|
||||
print("ok concurrent prunes")
|
||||
@@ -1,51 +0,0 @@
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Wed, 17 Jan 2018 14:42:20 +0000
|
||||
Subject: test-concurrency: Replace range with xrange
|
||||
|
||||
range in Python 3 does what xrange did in Python 2. This still works in
|
||||
Python 2, it just uses a bit more memory.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Applied-upstream: 2018.3, commit:02dc5e2dd47d1be0eb73d2f7e5b588f04c572390
|
||||
---
|
||||
tests/test-concurrency.py | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tests/test-concurrency.py b/tests/test-concurrency.py
|
||||
index 6fade24..f16f696 100755
|
||||
--- a/tests/test-concurrency.py
|
||||
+++ b/tests/test-concurrency.py
|
||||
@@ -34,7 +34,7 @@ def fatal(msg):
|
||||
def mktree(dname, serial=0):
|
||||
print('Creating tree', dname, file=sys.stderr)
|
||||
os.mkdir(dname, 0o755)
|
||||
- for v in xrange(20):
|
||||
+ for v in range(20):
|
||||
with open('{}/{}'.format(dname, v), 'w') as f:
|
||||
f.write('{} {} {}\n'.format(dname, serial, v))
|
||||
|
||||
@@ -79,12 +79,12 @@ def run(n_committers, n_pruners):
|
||||
|
||||
print('n_committers', n_committers, 'n_pruners', n_pruners, file=sys.stderr)
|
||||
n_trees = n_committers / 2
|
||||
- for v in xrange(n_trees):
|
||||
+ for v in range(n_trees):
|
||||
mktree('tree{}'.format(v))
|
||||
|
||||
- for v in xrange(n_committers):
|
||||
+ for v in range(n_committers):
|
||||
committers.add(commit(v / 2))
|
||||
- for v in xrange(n_pruners):
|
||||
+ for v in range(n_pruners):
|
||||
pruners.add(prune())
|
||||
|
||||
failed = False
|
||||
@@ -97,7 +97,7 @@ def run(n_committers, n_pruners):
|
||||
if failed:
|
||||
fatal('A child process exited abnormally')
|
||||
|
||||
- for v in xrange(n_trees):
|
||||
+ for v in range(n_trees):
|
||||
shutil.rmtree('tree{}'.format(v))
|
||||
|
||||
# No concurrent pruning
|
||||
@@ -1,25 +0,0 @@
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Wed, 17 Jan 2018 14:25:26 +0000
|
||||
Subject: test-concurrency: Use Python 3 syntax for octal
|
||||
|
||||
This also works in Python 2.7, and is a little clearer.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Applied-upstream: 2018.3, commit:9933de232304f47e2be09c72906cc5183d9bbfda
|
||||
---
|
||||
tests/test-concurrency.py | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/tests/test-concurrency.py b/tests/test-concurrency.py
|
||||
index bdcc1d9..6fade24 100755
|
||||
--- a/tests/test-concurrency.py
|
||||
+++ b/tests/test-concurrency.py
|
||||
@@ -33,7 +33,7 @@ def fatal(msg):
|
||||
# different files with different checksums.
|
||||
def mktree(dname, serial=0):
|
||||
print('Creating tree', dname, file=sys.stderr)
|
||||
- os.mkdir(dname, 0755)
|
||||
+ os.mkdir(dname, 0o755)
|
||||
for v in xrange(20):
|
||||
with open('{}/{}'.format(dname, v), 'w') as f:
|
||||
f.write('{} {} {}\n'.format(dname, serial, v))
|
||||
-37
@@ -1,37 +0,0 @@
|
||||
From: Simon McVittie <smcv@debian.org>
|
||||
Date: Wed, 17 Jan 2018 15:19:12 +0000
|
||||
Subject: tests/bootloader-entries-crosscheck: Use Python 3-friendly sorting
|
||||
|
||||
This is a little clearer than a strcmp()-style negative/zero/positive
|
||||
return, and also works in Python 2.
|
||||
|
||||
Signed-off-by: Simon McVittie <smcv@debian.org>
|
||||
Applied-upstream: 2018.3, commit:6cabeaed3f45c8f3e05fb5e1152bfa5b96a3bc79
|
||||
---
|
||||
tests/bootloader-entries-crosscheck.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/tests/bootloader-entries-crosscheck.py b/tests/bootloader-entries-crosscheck.py
|
||||
index 38e8e45..5faa548 100755
|
||||
--- a/tests/bootloader-entries-crosscheck.py
|
||||
+++ b/tests/bootloader-entries-crosscheck.py
|
||||
@@ -38,8 +38,8 @@ def fatal(msg):
|
||||
sys.stderr.write('\n')
|
||||
sys.exit(1)
|
||||
|
||||
-def compare_entries_descending(a, b):
|
||||
- return int(b['version']) - int(a['version'])
|
||||
+def entry_get_version(entry):
|
||||
+ return int(entry['version'])
|
||||
|
||||
def get_ostree_option(optionstring):
|
||||
for o in optionstring.split():
|
||||
@@ -65,7 +65,7 @@ for fname in os.listdir(loaderpath):
|
||||
v = line[s+1:]
|
||||
entry[k] = v
|
||||
entries.append(entry)
|
||||
- entries.sort(compare_entries_descending)
|
||||
+ entries.sort(key=entry_get_version, reverse=True)
|
||||
|
||||
# Parse SYSLINUX config
|
||||
with open(syslinuxpath) as f:
|
||||
Reference in new issue
Block a user