summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHridya Valsaraju <hridya@google.com>2018-02-08 11:09:35 -0800
committerHridya Valsaraju <hridya@google.com>2018-02-15 18:53:46 +0000
commitaaa41aaa9aa968dc094144ab2cd4ebe923184824 (patch)
tree00d22796586f36c8d118a73aae4c75bec75db98e /tests
parent45e84ede355c9e103cb810bd13bb126bf002f576 (diff)
downloadlibufdt-aaa41aaa9aa968dc094144ab2cd4ebe923184824.tar.gz
Move VTS test to verify DTBO to test/vts/host/verifyDTBO
Also moving verifyDTBO.sh to libufdt/test since it is a standalone test that can be run independent of VTS. Bug: 67779848 Bug: 72697311 Test: vts-tradefed run vts -m verifyDTBO Change-Id: I4c420404a482f7260796c93e054516bb6ec3b84f
Diffstat (limited to 'tests')
-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>