summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHridya Valsaraju <hridya@google.com>2018-02-20 20:14:25 +0000
committerandroid-build-merger <android-build-merger@google.com>2018-02-20 20:14:25 +0000
commit49fda136271a608a75452359f302298ce79c801a (patch)
tree00d22796586f36c8d118a73aae4c75bec75db98e
parenta98abbc7d67c62ca1f81fdf56e4badbb2f3437b1 (diff)
parent6f9f1a4e9b85f8d1c563a68517cc8f43f3344463 (diff)
downloadlibufdt-49fda136271a608a75452359f302298ce79c801a.tar.gz
Move VTS test to verify DTBO to test/vts/host/verifyDTBO am: aaa41aaa9a
am: 6f9f1a4e9b Change-Id: I79e40afb8b73ca234aa6b46c0176453111ec3060
-rw-r--r--tests/src/Android.mk15
-rw-r--r--tests/verifyDTBO.sh (renamed from tests/vts/verifyDTBO.sh)15
-rw-r--r--tests/vts/Android.mk35
-rw-r--r--tests/vts/AndroidTest.xml24
4 files changed, 25 insertions, 64 deletions
diff --git a/tests/src/Android.mk b/tests/src/Android.mk
index 27ba52c..9ede790 100644
--- a/tests/src/Android.mk
+++ b/tests/src/Android.mk
@@ -122,3 +122,18 @@ LOCAL_REQUIRED_MODULES := dtc
include $(BUILD_HOST_EXECUTABLE)
###################################################
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := ufdt_verify_overlay
+LOCAL_CFLAGS := $(libufdt_tests_cflags)
+LOCAL_SRC_FILES := ufdt_verify_overlay_app.cpp
+LOCAL_STATIC_LIBRARIES := \
+ libufdt \
+ libfdt \
+ libufdt_sysdeps \
+ libufdt_verify
+LOCAL_REQUIRED_MODULES := dtc
+
+include $(BUILD_NATIVE_TEST)
+
+###################################################
diff --git a/tests/vts/verifyDTBO.sh b/tests/verifyDTBO.sh
index e28ac5f..231101e 100644
--- a/tests/vts/verifyDTBO.sh
+++ b/tests/verifyDTBO.sh
@@ -5,7 +5,7 @@ if [ -z "${ANDROID_HOST_OUT}" ]; then
exit 1
fi
-ANDROID_VTS_HOST_BIN_LOCATION=${ANDROID_HOST_OUT}/vts/android-vts/testcases/host/bin
+ANDROID_HOST_BIN_LOCATION=${ANDROID_HOST_OUT}/bin
adb root
@@ -24,15 +24,20 @@ adb pull $dtbo_path dtbo.img > /dev/null
adb pull /sys/firmware/fdt final_dt > /dev/null
#decompile the DTBO image
-mkdtimg_path="${ANDROID_VTS_HOST_BIN_LOCATION}/mkdtimg"
+mkdtimg_path="${ANDROID_HOST_BIN_LOCATION}/mkdtimg"
$mkdtimg_path dump dtbo.img -b dumped_dtbo > /dev/null
#Get the index of the overlay applied from the kernel command line
-overlay_idx=$(adb shell cat /proc/cmdline | grep -o "androidboot.dtbo_idx=\w*" | cut -d "=" -f 2)
+overlay_idx=$(adb shell cat /proc/cmdline | grep -o "androidboot.dtbo_idx=[^ ]*" | cut -d "=" -f 2)
+arg=""
+for idx in ${overlay_idx//,/ }
+do
+ arg="${arg}dumped_dtbo.${idx} "
+done
#verify that the overlay was correctly applied
-verify_bin_path="${ANDROID_VTS_HOST_BIN_LOCATION}/ufdt_verify_overlay_host"
-$verify_bin_path final_dt dumped_dtbo.$overlay_idx
+verify_bin_path="${ANDROID_HOST_BIN_LOCATION}/ufdt_verify_overlay_host"
+$verify_bin_path final_dt $arg
result=$?
if [[ "$result" -eq "0" ]]; then
diff --git a/tests/vts/Android.mk b/tests/vts/Android.mk
deleted file mode 100644
index 99681b5..0000000
--- a/tests/vts/Android.mk
+++ /dev/null
@@ -1,35 +0,0 @@
-#
-# Copyright (C) 2018 The Android Open Source Project
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# 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.
-#
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := verifyDTBO.sh
-LOCAL_SRC_FILES := verifyDTBO.sh
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_TAGS := optional
-LOCAL_IS_HOST_MODULE := true
-LOCAL_REQUIRED_MODULES := \
- mkdtimg \
- ufdt_verify_overlay_host \
-
-include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-
-LOCAL_MODULE := VtsVerifyDTBOTest
-VTS_CONFIG_SRC_DIR := system/tools/libufdt/test/vts
--include test/vts/tools/build/Android.host_config.mk
diff --git a/tests/vts/AndroidTest.xml b/tests/vts/AndroidTest.xml
deleted file mode 100644
index 6add7c5..0000000
--- a/tests/vts/AndroidTest.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Copyright (C) 2018 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- 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.
--->
-<configuration description="Config for VTS DTBO verification">
- <multi_target_preparer class="com.android.tradefed.targetprep.VtsPythonVirtualenvPreparer"/>
- <test class="com.android.tradefed.testtype.VtsMultiDeviceTest">
- <option name="test-module-name" value="VtsVerifyDTBOTest"/>
- <option name="binary-test-source" value="out/host/linux-x86/vts/android-vts/testcases/host/bin/verifyDTBO.sh" />
- <option name="binary-test-type" value="host_binary_test"/>
- <option name="test-timeout" value="1m"/>
- </test>
-</configuration>