cros-codecs: Add H264 decode test with basic test setup

This CL adds the Android build definition for H264 decode test with
cros-codecs. This change is required before having the test module
exempt from the general-tests presubmit check to use GS dynamic
link for external data.

Bug: 414463909
Test: atest ccdec_h264_test
Change-Id: I71eb7099ac3c57024bb1396c8a1dfb70f898a1fa
diff --git a/Android.bp b/Android.bp
index 4087a9a..34877e6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -30,7 +30,7 @@
         "libgbm_sys",
         "libnix",
         "libzerocopy",
-	"librand",
+        "librand",
     ],
     aliases: ["cros_libva:libva"],
     apex_available: [
@@ -186,6 +186,15 @@
     data_bins: ["ccdec"],
 }
 
+rust_test {
+    name: "ccdec_h264_test",
+    srcs: ["tests/ccdec/ccdec_h264_test.rs"],
+    defaults: ["libcros_codecs_tests_defaults"],
+    test_suites: ["general-tests"],
+    test_config: "tests/configs/ccdec_h264_test.xml",
+    data_bins: ["ccdec"],
+}
+
 filegroup {
     name: "ccdec_test_data",
     srcs: [
diff --git a/tests/ccdec/ccdec_h264_test.rs b/tests/ccdec/ccdec_h264_test.rs
new file mode 100644
index 0000000..e010de9
--- /dev/null
+++ b/tests/ccdec/ccdec_h264_test.rs
@@ -0,0 +1,10 @@
+// Copyright 2025 The ChromiumOS Authors
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#[cfg(test)]
+#[allow(dead_code)]
+mod tests {
+    // TODO(b/400788075): Add tests with external data dependencies once exempt
+    // to use GS dynamic link.
+}
diff --git a/tests/configs/ccdec_h264_test.xml b/tests/configs/ccdec_h264_test.xml
new file mode 100644
index 0000000..96bfe62
--- /dev/null
+++ b/tests/configs/ccdec_h264_test.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2025 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 to run H264 decode integration tests.">
+    <target_preparer class="com.android.tradefed.targetprep.RootTargetPreparer"/>
+    <target_preparer class="com.android.tradefed.targetprep.PushFilePreparer">
+        <option name="push-file" key="ccdec_h264_test" value="/data/local/tmp/ccdec_h264_test" />
+        s<!-- TODO(b/400788075): Add external data dependencies once exempt to use GS dynamic link  -->
+        <option name="cleanup" value="true" />
+    </target_preparer>
+
+    <test class="com.android.tradefed.testtype.rust.RustBinaryTest" >
+        <option name="test-device-path" value="/data/local/tmp" />
+        <option name="module-name" value="ccdec_h264_test" />
+        <option name="native-test-flag" value="--test-threads=1" />
+    </test>
+</configuration>