Commit graph

183 commits

Author SHA1 Message Date
Treehugger Robot
8766c010ba Merge "Running update-makefiles for fixed spacing." 2016-11-02 00:44:16 +00:00
Yifan Hong
688bb1e2c6 Add test for null native_handle_t*.
Test: hidl_test

Bug: 30814137
Change-Id: Ic52a4c588e2fde3859a0ae8c098e5cb60a87efe8
2016-11-02 00:16:17 +00:00
Steven Moreland
7982058699 Running update-makefiles for fixed spacing.
Test: pass
Change-Id: I4dcaf70b1c014f3ecf685d4884601be6f17ee51d
2016-11-01 20:06:29 +00:00
Martijn Coenen
b7307d5c8a Add method to IFoo for testing NULL interfaces.
Bug: 32410513
Test: mma, hidl_test
Change-Id: I791c3a95e670a859e5e494ead987d2a93f5047a5
2016-11-01 13:09:53 +01:00
Yifan Hong
ebfa633103 Add interface methods for testing vec<handle>.
Test: hidl_test
Bug: 32160974
Change-Id: I7eda1650fcf8d58778b2aad97a5bd62afc95bc36
2016-10-31 12:02:35 +00:00
Yifan Hong
cc6ad7dfe5 add test for binder inheritance.
Test: hidl_test
Test: `make hidl_test_java` compiles
Change-Id: Ie9217b79e369f2a1e7a7c9ed02524b17e3fc8b7f
2016-10-26 15:27:23 -07:00
Treehugger Robot
a6b44aad97 Merge "Add methods to test flavor of FMQ supporting unsynchronized writes." 2016-10-26 16:37:18 +00:00
Steven Moreland
7a4f118c48 Stop all these merge conflicts.
Test: mma -j64
Change-Id: I319198af32adf1fef180c5c2c22ba4b360fa7609
2016-10-26 12:05:29 +02:00
Steven Moreland
54813ed7c6 Use hidl_string conversion constructor as test.
Test: hidl_test
Change-Id: I626c40e1a3121e4f41ba9f612efc7321f7c03f85
2016-10-24 12:13:17 -07:00
Yifan Hong
30dc3dee3c hidl_test: move duplicated code to shared lib
Test: hidl_test

Change-Id: Ia68b78d44d68a6b254c686afe64faf7cc89510d7
2016-10-24 10:15:54 -07:00
Zhuoyao Zhang
382a80fd8b Merge "Add implementation for hwbinder benchmark service." 2016-10-24 16:52:49 +00:00
Steven Moreland
ce9779412a Update headers (for export shared lib headers)
Test: mma -j64
Bug: 32337293
Change-Id: I93e7cab90efac407525a1a5f2ad30f816a530e17
2016-10-22 00:28:00 +00:00
Steven Moreland
6b9bae82ee Removed overloaded functions from IFoo.hal.
Bug: 31758541
Test: hidl_test
Change-Id: Ic92cf9996357a8aa9b3785540784c686887032e0
2016-10-22 00:16:57 +00:00
Zhuoyao Zhang
eb9f507823 Add implementation for hwbinder benchmark service.
Bug:32279499
Test: make android.hardware.tests.libhwbinder@1.0-impl
Change-Id: I75056afa32b8189020608779ec495659ea35ed48
2016-10-21 13:22:12 -07:00
Andreas Huber
847b14511a Adds tests to verify proper marshaling of vectors of interface types.
Bug: 30570663
Test: hidl_test
Change-Id: I1e4d1f826773abbde6b9019eb6af90ac64007e38
2016-10-20 09:20:50 -07:00
Hridya Valsaraju
b43584556f Add methods to test flavor of FMQ supporting unsynchronized writes.
Test: Built and ran the unit tests.
Bug: 31223183

Change-Id: Ib0c52c4d17d31a24f4c5f5cd96547bcfae673725
2016-10-19 18:19:13 -07:00
Andreas Huber
f7ad111d72 Merge "Adds a test to verify proper marshaling of vectors of arrays in Java" 2016-10-19 19:30:29 +00:00
Andreas Huber
28c85b78b0 Adds a test to verify proper marshaling of vectors of arrays in Java
Bug: 32180328
Test: hidl_test_java
Change-Id: I756ce1d2ce35b7a3a63c6dbafba90e9765d61f64
2016-10-18 13:56:04 -07:00
Yifan Hong
9517f9c871 hidl_test: Fix failing tests.
Test: The following succeeds.
croot && cd hardware/interfaces
mma
croot && cd system/tools/hidl
mma
adb shell /data/nativetest64/hidl_test/hidl_test

Bug: 31819198

Change-Id: I40c2338d09d5e80b9bad2d918b7b8c3f2709f434
2016-10-18 11:39:00 -07:00
Yifan Hong
d5b5b2ecea add default implementation to android.hardware.tests.foo/bar/pointer@1.0
Test: hidl_test
Test: mma

Merged-In: I808423c040099354513db0ad108210fcec17c8a7
Change-Id: I808423c040099354513db0ad108210fcec17c8a7
2016-10-18 11:39:00 -07:00
Steven Moreland
45ca9939a0 Merge "Revert "Remove test for overloaded function."" 2016-10-18 18:34:04 +00:00
Steven Moreland
a3d9fe2cd4 Revert "Remove test for overloaded function."
This reverts commit 93800287fb.

Change-Id: I95b0aeb64eaf9938c6558e5817bd79c3f2e5496e
2016-10-18 18:32:49 +00:00
Treehugger Robot
51a703aea4 Merge "Remove test for overloaded function." 2016-10-18 17:45:28 +00:00
Steven Moreland
93800287fb Remove test for overloaded function.
Bug: 31758541
Test: hidl_test
Change-Id: Ib02d9e8531ea2b7ec36bf8785e6827cfa45b53ba
2016-10-17 17:53:09 -07:00
Yifan Hong
deb0cfcea3 Add test for single letter IDs.
Test: mma

Bug: 32068694
Change-Id: I56659715beaadd8ebb3b9f36558e7ebcdb3e4d27
2016-10-17 16:57:51 -07:00
Hridya Valsaraju
954515f73a Modify return values of read/write/config methods to bool
Modify return values of read/write/config methods to bool
for the FMQ unit tests and benchmarks.

Bug: 31780470
Test: Built and ran existing FMQ unit tests and benchmarks

Change-Id: I2b7c9cf073f0c1a2908d48552e258ce21240ae64
2016-10-14 23:55:52 +00:00
Steven Moreland
86c848de0b Added test for overloading.
Test: make, hidl_test
Bug: 31758541
Change-Id: Ia0fdad2f0b0155065a7dec5526ab5d14a9ec1f52
2016-10-11 22:40:50 +00:00
Yifan Hong
a543fe6ab0 Merge "Add test for importing a single type." 2016-10-10 19:49:45 +00:00
Yifan Hong
799ebcb7fa Add test for importing a single type.
Test: `cd system/tools/hidl && mma`

Bug: 31821285

Change-Id: I0be97b16b84f76b64c09f9dc52709416601cbbdf
2016-10-07 19:43:43 -07:00
Yifan Hong
e312006887 Add test for fixing 0XFF (upper X)
Bug: 31983995

Test: make android.hardware.tests.expression@1.0
Change-Id: I05bed0164c5cc988843a60d1efc8f5aeb4986b9b
2016-10-07 16:32:57 -07:00
Yifan Hong
c5be5aca63 Add test for missing package name for FQName lookup.
Bug: 31705664

Test: `cd system/tools/hidl && mma`
Change-Id: If3568f1d1e77ad97ccfce5eac5938048f3852560
2016-10-05 15:50:28 -07:00
Yifan Hong
223b82a07d Add test for vec<vec<T>> as a return value.
Bug: 31955917

Test: hidl_test
Change-Id: I9ae7f9b04126261210cb4621266676727877d92f
2016-10-05 14:12:30 -07:00
Yifan Hong
61db854465 Add test for referring to nested types.
Bug: 31821285

Test: `make hidl_test && adb sync && adb shell hidl_test`
Change-Id: Iae030baa5bbe6e890512b494a0b657163c6a99a6
2016-10-04 10:40:55 -07:00
Dan Willemsen
242b34edd5 Convert to Android.bp
See build/soong/README.md for more information.

Bug: 31742855
Test: mma -j
Change-Id: Icb93f3b1b2caeb5e9c00f88ca35841b927ad075d
2016-09-30 10:31:54 -07:00
Yifan Hong
fe2b098355 Tests for Reference Support.
Bug: 31300815 pointer support
Bug: 31349114 nested types
Bug: 31757611 Parcel ref# cap

Test: `make hidl_test && adb sync && adb shell hidl_test`
      Only works with a kernel patch.

Change-Id: I48351b1bf861a4d2d77f823f7242524156cde1e7
2016-09-29 14:57:22 -07:00
Treehugger Robot
aa3a8e0dbc Merge "Use MQDescriptorSync instead of MQdescriptor in interface" 2016-09-29 16:48:53 +00:00
Andreas Huber
88476c157b Verify that method arguments and results can share the same name.
Bug: 30778622
Test: hidl_test, hidl_test_java
Change-Id: Idb35a03337010c1fb63c2896f216392398e03e0c
2016-09-28 13:43:39 -07:00
Treehugger Robot
e168ebab22 Merge "Verify that vectors of arrays within structures are properly marshaled" 2016-09-28 17:16:52 +00:00
Hridya Valsaraju
9d9672cce2 Use MQDescriptorSync instead of MQdescriptor in interface
Add comments and cleanup code as per HIDL style guidelines.

Bug: 31550963
Test: Built and ran existing FMQ unit tests and benchmarks.

Change-Id: I0a09ba1fcb520b46e5e6299b473c962c93d815eb
2016-09-27 22:22:19 +00:00
Andreas Huber
fd77f50d55 Verify that vectors of arrays within structures are properly marshaled
in the Java backend.

Change-Id: I70baa4ac55d8b0e06b31b2e50662be14b8528ff3
Bug: 31682327
Test: hidl_test_java
2016-09-26 16:34:29 -07:00
Yifan Hong
b0b5322e7d Updated indentation to 4 spaces for Android.mk.
Test: `cd system/tools/hidl && mma`
Change-Id: I088893c3c8b080239f0f32e3434faf3da3fefc7a
2016-09-26 16:02:39 -07:00
Yifan Hong
467bb282d2 Updated tests for constant expressions.
Test: `make android.hardware.tests.expression@1.0` compiles
      and generates enum class Color with autofilled values.
Test: `make hidl_test_java` succeeded.
Test: `make hidl_test` succeeded.

Bug: 31628863 Add test for autofilling enum values.
Bug: 31592132 allow constant expressions be array sizes.

Change-Id: I79f35365f1d37843922725ad5a405848f3e8ec08
2016-09-26 13:39:22 -07:00
Andreas Huber
495391aad8 Updated makefiles that also add static java library targets.
Bug: 31684178
Test: hidl_test and hidl_test_java
Change-Id: Ib53d1be2b1535837ca97cb61796e335141fc7611
2016-09-23 09:21:15 -07:00
Iliyan Malchev
998892cce7 update auto-generated makefiles
b/31524912
Test: pass

Change-Id: Iafea8f87e93181041f42820df39ec43b3c785410
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-22 23:31:33 +00:00
Andreas Huber
f1d448b6a9 [Java] Add a test to verify that typedefs in types.hal does not mistakenly
generate a makefile rule.

Bug: 31678014
Test: regenerate makefiles using hidl-gen.
Change-Id: I72ceaedd33288269b74e2aa233043c741994cd1a
2016-09-22 13:22:47 -07:00
Andreas Huber
fc0b6c484a Verify that structs with multiple array fields now successfully compile for Java
Previously "_hidl_array_offset_*" was redeclared multiple times in the same
scope.

Bug: 31675085
Test: run hidl_test, hidl_test_java
Change-Id: I370956ae3008c05bda66dc5cdc44d33c9883376f
2016-09-22 11:25:23 -07:00
Treehugger Robot
ed76563377 Merge "Additional test cases to verify multi-dimensional arrays work properly." 2016-09-20 20:28:12 +00:00
Andreas Huber
8e237941ef Additional test cases to verify multi-dimensional arrays work properly.
Bug: 31438033
Change-Id: I1fc58cbbe6f161f7f71a43fa43d743843ba22f76
Test: run updated "hidl_test" and "hidl_test_java"
2016-09-19 14:07:54 -07:00
Zhuoyao Zhang
adc313d43d Add dependency on libcutils.
* Used for get system properies.

Test: pass test hidl_test.
Change-Id: I3b6d2deb442cd627a6f30312f0c204177d410ecb
2016-09-19 12:52:09 -07:00
Yifan Hong
252c1c58a4 Remove @hal_type from .hal files.
Test: ran make android.hardware.nfc@1.0 successfully
      compiles.

Bug: 31527823

Change-Id: Ib2c2f40ef6a8939a8344ade6138a7b0f32f14ba9
2016-09-19 10:19:24 -07:00
Andreas Huber
9c43f016b6 Add tests to verify that multi-dimensional arrays in Java work (inside structs)
Bug: 31438033
Change-Id: Ic27868fb0f603ca4acb2a42f144493d6ec26044f
2016-09-15 09:28:31 -07:00
Andreas Huber
cf8560c508 Adds tests to verify proper C++ code generation for multi-dimensional arrays
and vectors of arrays.

Bug: 31438033
Change-Id: Ia7c2198de31bdb4705687726abe3d0371625e56a
2016-09-13 09:34:40 -07:00
Treehugger Robot
d66bb6fb5c Merge "interfaces: regenerate makefiles" 2016-09-13 04:52:48 +00:00
Treehugger Robot
3d49850a49 Merge "Java test interface extended to verify vec<STRUCT-TYPE> and STRUCT-TYPE[]" 2016-09-12 17:50:11 +00:00
Iliyan Malchev
c6c7aabdc9 interfaces: regenerate makefiles
b/31372383

Change-Id: I4fd9d3f174a22f29bc3beb9aeb7c30fc6bd4acd8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-09 16:28:23 -07:00
Andreas Huber
f399e50a90 Java test interface extended to verify vec<STRUCT-TYPE> and STRUCT-TYPE[]
argument/result passing.

Bug: 31380705
Change-Id: I17fd03a10f9740f68a6fb318a5c2ef9847f4c050
2016-09-09 15:06:35 -07:00
Andreas Huber
4a99f3afae WireMQDescriptor => MQDescriptor
b/31091383 Adding WireMQDescriptor as a hidl type

Change-Id: Iff23c833e8ab232ad37fd9bfbfe4d49fbc06b369
2016-09-09 11:35:48 -07:00
Iliyan Malchev
da96fb2a94 android.hardware.tests.msgq@1.0: modify ITestMsgQ
Modify the configure() method so that the implementation does not have
to rely on status_t to return service errors.

b/31367910
b/31348667

Change-Id: I0bc88c396ce4e55ed38b534b7e3ae2c0a4faad62
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-08 15:12:36 -07:00
Iliyan Malchev
b350caf9dc interfaces: update makefiles
b/31015466
b/31045569

Change-Id: I07d54fd956fedc4b94622ace1c8f2be3f2f93b2b
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-09-07 14:37:35 -07:00
TreeHugger Robot
c0ba83e30a Merge "Updated makefiles (includes java-library rules for applicable packages)." 2016-09-01 00:08:22 +00:00
Andreas Huber
7ab75a7325 Updated makefiles (includes java-library rules for applicable packages).
Change-Id: I178faf37dddb5149c1bdc217fa1395b2566194d7
Bug: 31221188
2016-08-31 13:56:05 -07:00
Keun Soo Yim
989087535a Revert "package android.hardware.tests.* as part of VTS (auto-generated)"
This reverts commit afba0364c6.

Change-Id: I9d143d97ef7857502d88fef92b9ae336ee824bcd
2016-08-31 08:47:29 -07:00
Yifan Hong
a401680f6e add test for constant expression evaluation output
Simply run:

    # hidl_gen converts .hal to .h correctly
    make hidl_gen_test
    # converted .h can compile
    make android.hardware.tests.expression@1.0

to run the tests.

b/30951879: int8_t is same as char, and when emitting output the
	    character corresponding to that number is emitted instead of
	    the number itself.

Change-Id: Icacba6b6262cc0026a94f64527b80e2c0e35e72e
2016-08-30 23:15:05 -07:00
Iliyan Malchev
092d4cdfa0 Merge "Apache2 module license." 2016-08-31 05:24:20 +00:00
Martijn Coenen
cbe590cb9f Apache2 module license.
Bug: 31110244
Change-Id: I7ce63f940199e8cd7d193bdde39fc6cd448db802
2016-08-30 11:28:36 -07:00
Andreas Huber
669bf7a5ae Interface 'IBaz' and friends used by "hidl_test_java".
Change-Id: If49d996e34ba5aa48488e92e71234208001bfddb
2016-08-29 10:23:17 -07:00
Keun Soo Yim
3cdfe14922 build 32- and 64-bit libs (auto-generated)
Change-Id: Iccb63cafc5db17abd423d589416d50ff21c89efa
2016-08-26 18:55:21 -07:00
Iliyan Malchev
b9c08207c1 android.hardware.tests.foo@1.0::IFooCallback: add instrumentation
Add two instrumentation methods to IFooCallback, to help with timing
measurements in gTest.

The first one, reportResults(), blocks the caller for a given length of
time while waiting for all the other methods to execute, then reports
whether these methods were executed within this length of time, for how
long their caller was blocked, and also how long the execution of the
bodies of each of them took.  Note that the execution time for a
method's body is independent of whether it is a oneway or a blocking
method.  For example, heyItsTheMeaningOfLife() is a oneway method, so it
returns immediately to the caller (so the caller-blocked time should be
very small).  However, if its body takes several seconds to run, then
this is the information that will be returned for
heyItsTheMeaningOfLife() as well.

The second instrumentation method, youBlockedMeFor(), is used by the
caller of IFooCallback to report how long the caller was blocked for.
This information is saved and passed by reportResults() as described
above.

b/30855757 Convert hidl test to gTest

Change-Id: I35ac708e424bcb143fce959609fcc747f1ec37fb
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-08-25 07:52:09 -07:00
Zhuoyao Zhang
90ff869890 Add test aidl file for benchmark binder performance.
Bug: 31068579
Change-Id: Idf7d5da902eb17f166ac07dc966c009bc1d9c7ae
2016-08-24 18:01:00 -07:00
Keun Soo Yim
afba0364c6 package android.hardware.tests.* as part of VTS (auto-generated)
this is to run the benchmarks continuously in the lab

Change-Id: Ia45c440a77ccc16db2cb1066ecde3b6521991ec9
2016-08-24 07:58:59 -07:00
Keun Soo Yim
6b4d639626 regenerate Android.mk files
Change-Id: I6a8b48943df469c9f345c05fb00c671f6f8dd393
2016-08-22 17:25:48 -07:00
Martijn Coenen
384150191f Updated makefiles linking against libhidl.
Bug: 30839546
Change-Id: I8c68d0b8db0816f9bfe58fc3898114fb9e151ddc
2016-08-19 14:06:56 +02:00
Yifan Hong
ab407f096e add tests for parsing constant expressions.
Change-Id: Ic1f524c604fc72b9d1b7b330b608ff38ce287921
2016-08-16 15:35:14 -07:00
Andreas Huber
564cc0ab33 "import types" should never be necessary, it is implicit (if types.hal exists)
Change-Id: I63e6a2104415a5a71bf3eb93c646f9bf32f1b079
2016-08-16 10:17:39 -07:00
Iliyan Malchev
9bc55e2b41 Merge "android.hardware.tests.foo@1.0::IFooCallback: use booleans" 2016-08-16 14:46:00 +00:00
Iliyan Malchev
11946ae834 Merge "android.hardware.tests.foo@1.0: add oneway methods" 2016-08-16 14:45:18 +00:00
Hridya Valsaraju
1e69d11c6c Merge "Move .hal file for FMQ tests to harware/interfaces" 2016-08-15 16:56:09 +00:00
Iliyan Malchev
614bb72e00 android.hardware.tests.foo@1.0::IFooCallback: use booleans
b/30853785 auto-generation for bools is broken

Change-Id: Ia1c1e1f03360d5c7e4162b24a83082bc833a8a34
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-08-14 13:37:04 -07:00
Iliyan Malchev
e96606a7df android.hardware.tests.foo@1.0: add oneway methods
b/30843534: oneway methods seem broken

Change-Id: I3e152d6bd70da60648157269a9465921afa661b3
Signed-off-by: Iliyan Malchev <malchev@google.com>
2016-08-13 23:06:34 -07:00
Steven Moreland
68c05d6a17 Merge "Added mock interfaces" 2016-08-13 00:04:28 +00:00
Hridya Valsaraju
3e32003be1 Move .hal file for FMQ tests to harware/interfaces
This is required to convert to the new hidl-gen.

Change-Id: I87a5d3d006fe80ad16d4abb63d400b3c52a2bae9
2016-08-12 13:18:29 -07:00
Martijn Coenen
aea5ad1a21 libhwbinder benchmark interface.
Change-Id: I2863272033bfe986f70f75c51412b8c1a55a84f3
2016-08-12 10:57:55 +02:00
Steven Moreland
61651882cd Added mock interfaces
Change-Id: I227bb450e714e392a3959c0d314842b9879f8b99
2016-08-11 14:38:55 -07:00