From b8eb19e56682bc7546ad4ba12db46cd4fa48dfa1 Mon Sep 17 00:00:00 2001 From: Aneesh Agrawal Date: Sun, 20 Mar 2016 17:01:21 -0400 Subject: [PATCH] Add Python 3 compatibility to Android symbol checker Make the script that checks for undefined Android symbols compatible with both Python 2 and Python 3, to allow for future updates to the default system Python on our build machines. I'd like to land this before https://github.com/servo/saltfs/pull/249. We currently use Ubuntu 14.04 (an LTS release); Ubuntu is aiming for Python 3 as the default Python in the next LTS release, 16.04, and I'd like to have any scripts be ready for the transition. --- etc/ci/check_dynamic_symbols.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etc/ci/check_dynamic_symbols.py b/etc/ci/check_dynamic_symbols.py index 3eb8bd87f13e..4f83a8b98aa2 100644 --- a/etc/ci/check_dynamic_symbols.py +++ b/etc/ci/check_dynamic_symbols.py @@ -11,15 +11,15 @@ import re import subprocess -symbol_regex = re.compile("D \*UND\*\t(.*) (.*)$") -allowed_symbols = frozenset(['unshare', 'malloc_usable_size']) +symbol_regex = re.compile(b"D \*UND\*\t(.*) (.*)$") +allowed_symbols = frozenset([b'unshare', b'malloc_usable_size']) actual_symbols = set() objdump_output = subprocess.check_output([ 'arm-linux-androideabi-objdump', '-T', 'target/arm-linux-androideabi/debug/libservo.so'] -).split('\n') +).split(b'\n') for line in objdump_output: m = symbol_regex.search(line)