Add CryptfsScryptHidlizationEquivalenceTest

Disk encryption keys are derived using scrypt. If available, this is
done by means of keymaster. An RSA key is generated and password is
signed by that key. The signature is used as the key.

With the hidlization of the keymaster HAL, this code had to be ported.
This test checks the equivalence of the legacy implementation with
the new hildized one.

Test: run /data/nativetest/vold_cryptfs_scrypt_hidlization_equivalence_test/vold_cryptfs_scrypt_hidlization_equivalence_test

Bug: 35028230
Bug: 32020919
Change-Id: Iabf4686dbff5341791ba3a98d7c95c5058c234f9
diff --git a/tests/Android.mk b/tests/Android.mk
index 416e621..4b6573e 100644
--- a/tests/Android.mk
+++ b/tests/Android.mk
@@ -8,8 +8,32 @@
     system/core/fs_mgr/include
 
 LOCAL_STATIC_LIBRARIES := libselinux libvold liblog libcrypto
+
 LOCAL_SRC_FILES := VolumeManager_test.cpp
 LOCAL_MODULE := vold_tests
 LOCAL_MODULE_TAGS := eng tests
 
 include $(BUILD_NATIVE_TEST)
+
+include $(CLEAR_VARS)
+LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
+
+# LOCAL_C_INCLUDES := \
+    system/core/fs_mgr/include
+
+LOCAL_STATIC_LIBRARIES := libselinux libvold liblog libcrypto
+LOCAL_SHARED_LIBRARIES := \
+    libutils \
+    libbase \
+    libhardware \
+    libhardware_legacy \
+    libhwbinder \
+    libhidlbase \
+    libkeystore_binder \
+    android.hardware.keymaster@3.0
+
+LOCAL_SRC_FILES := CryptfsScryptHidlizationEquivalence_test.cpp
+LOCAL_MODULE := vold_cryptfs_scrypt_hidlization_equivalence_test
+LOCAL_MODULE_TAGS := eng tests
+
+include $(BUILD_NATIVE_TEST)