Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
| 5 | java_test_host { |
| 6 | name: "AuthFsBenchmarks", |
| 7 | srcs: ["src/java/com/android/fs/benchmarks/*.java"], |
| 8 | libs: [ |
| 9 | "tradefed", |
| 10 | ], |
| 11 | static_libs: [ |
| 12 | "AuthFsHostTestCommon", |
| 13 | "MicrodroidHostTestHelper", |
Alice Wang | cd9ab9b | 2022-10-27 19:59:26 +0000 | [diff] [blame] | 14 | "cts-host-utils", |
Jaewan Kim | 64d2e41 | 2023-04-11 16:20:11 +0900 | [diff] [blame] | 15 | "MicrodroidTestPreparer", // Workaround for sandboxed test environment to install this |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 16 | ], |
| 17 | test_suites: ["general-tests"], |
| 18 | data_device_bins_first: [ |
| 19 | "open_then_run", |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 20 | ], |
| 21 | per_testcase_directory: true, |
| 22 | data: [ |
| 23 | ":authfs_test_files", |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 24 | ":MicrodroidTestApp", |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 25 | ], |
Jaewan Kim | 6d11d37 | 2023-04-11 11:21:51 +0900 | [diff] [blame] | 26 | required: ["MicrodroidTestPreparer"], |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 27 | } |
| 28 | |
| 29 | cc_binary { |
| 30 | name: "measure_io", |
Nikita Ioffe | 38b9e71 | 2024-02-08 15:55:07 +0000 | [diff] [blame] | 31 | defaults: ["avf_build_flags_cc"], |
Alice Wang | e4829c8 | 2022-10-18 14:05:28 +0000 | [diff] [blame] | 32 | srcs: [ |
| 33 | "src/measure_io.cpp", |
| 34 | ], |
| 35 | shared_libs: [ |
| 36 | "libbase", |
| 37 | ], |
| 38 | } |
Nikita Ioffe | a7cb367 | 2023-02-24 23:10:34 +0000 | [diff] [blame] | 39 | |
| 40 | // Package measure_io binary into a jar, to bundle with the MicrodroidTestApp. |
| 41 | // When MicrodroidTestApp is mounted inside the Microdroid, the zipfuse will |
| 42 | // add the +x permission on it. |
| 43 | java_genrule { |
| 44 | name: "measure_io_as_jar", |
| 45 | out: ["measure_io.jar"], |
| 46 | srcs: [ |
| 47 | ":measure_io", |
| 48 | ], |
Dan Willemsen | 2ef575b | 2024-02-16 20:39:06 -0500 | [diff] [blame] | 49 | tools: ["soong_zip"], |
| 50 | cmd: "mkdir -p $(genDir)/bin" + |
| 51 | "&& cp $(in) $(genDir)/bin" + |
| 52 | "&& $(location soong_zip) -jar -o $(out) -C $(genDir) -D $(genDir)/bin", |
Nikita Ioffe | a7cb367 | 2023-02-24 23:10:34 +0000 | [diff] [blame] | 53 | } |