Convert mkdtboimg.py to python 3
I was not able to test mkdtboimg_acpi_testdata.sh, because
aosp/1391197 appears to have broken mkdtboimg.py when
--version 2 is passed (or anything other than 0/1).
Bug: 203436762
Test: ./mkdtboimg_testdata.sh
Change-Id: I818f9124a3680c7a64935fd406756880e1ddc6c2
diff --git a/utils/src/Android.bp b/utils/src/Android.bp
index 03f4aa6..997121b 100644
--- a/utils/src/Android.bp
+++ b/utils/src/Android.bp
@@ -59,12 +59,8 @@
main: "mkdtboimg.py",
srcs: ["mkdtboimg.py"],
version: {
- py2: {
- embedded_launcher: true,
- enabled: true,
- },
py3: {
- enabled: false,
+ embedded_launcher: true,
},
},
}
diff --git a/utils/src/mkdtboimg.py b/utils/src/mkdtboimg.py
index bc33e1f..5eeb5ea 100755
--- a/utils/src/mkdtboimg.py
+++ b/utils/src/mkdtboimg.py
@@ -1,4 +1,4 @@
-#! /usr/bin/env python
+#! /usr/bin/env python3
# Copyright 2017, The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/utils/tests/mkdtboimg_acpi_testdata.sh b/utils/tests/mkdtboimg_acpi_testdata.sh
index edaf280..2681703 100755
--- a/utils/tests/mkdtboimg_acpi_testdata.sh
+++ b/utils/tests/mkdtboimg_acpi_testdata.sh
@@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+set -e
if ! hash iasl; then
echo "Please install 'acpica-tools' first"
diff --git a/utils/tests/mkdtboimg_testdata.sh b/utils/tests/mkdtboimg_testdata.sh
index 12c2f95..51db394 100755
--- a/utils/tests/mkdtboimg_testdata.sh
+++ b/utils/tests/mkdtboimg_testdata.sh
@@ -12,6 +12,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
+set -e
SRCDIR="data"
DTS_LIST="