Home | History | Annotate | Download | only in tests
      1 // Build the unit tests for audio_utils
      2 
      3 cc_test {
      4     name: "primitives_tests",
      5     host_supported: true,
      6 
      7     shared_libs: [
      8         "liblog",
      9         "libcutils",
     10     ],
     11     srcs: ["primitives_tests.cpp"],
     12     cflags: [
     13         "-Werror",
     14         "-Wall",
     15     ],
     16     target: {
     17         android: {
     18             shared_libs: ["libaudioutils"],
     19         },
     20         host: {
     21             static_libs: ["libaudioutils"],
     22         },
     23     }
     24 }
     25 
     26 cc_binary {
     27     name: "fifo_tests",
     28     host_supported: true,
     29     srcs: ["fifo_tests.cpp"],
     30     shared_libs: ["libaudioutils"],
     31     static_libs: ["libsndfile"],
     32     cflags: [
     33         "-Werror",
     34         "-Wall",
     35     ],
     36 }
     37 
     38 cc_binary {
     39     name: "fifo_multiprocess",
     40     host_supported: false,
     41     srcs: ["fifo_multiprocess.cpp"],
     42     shared_libs: ["libaudioutils", "libcutils"],
     43     static_libs: ["libsndfile"],
     44     cflags: [
     45         "-Werror",
     46         "-Wall",
     47     ],
     48 }
     49 
     50 cc_binary_host {
     51     name: "fifo_threads",
     52     // TODO move getch.c and .h to a utility library
     53     srcs: [
     54         "fifo_threads.cpp",
     55         "getch.c",
     56     ],
     57     static_libs: [
     58         "libaudioutils",
     59         "liblog",
     60     ],
     61     cflags: [
     62         "-Werror",
     63         "-Wall",
     64     ],
     65 }
     66 
     67 cc_binary_host {
     68     name: "limiter_tests",
     69     srcs: ["limiter_tests.c"],
     70     static_libs: ["libaudioutils"],
     71     cflags: [
     72         "-Werror",
     73         "-Wall",
     74         "-UNDEBUG",
     75     ],
     76 }
     77 
     78 cc_test {
     79     name: "power_tests",
     80     host_supported: true,
     81 
     82     shared_libs: [
     83         "libcutils",
     84         "liblog",
     85     ],
     86     srcs: ["power_tests.cpp"],
     87     cflags: [
     88         "-Wall",
     89         "-Werror",
     90         "-Wextra",
     91     ],
     92     target: {
     93         android: {
     94             shared_libs: ["libaudioutils"],
     95         },
     96         host: {
     97             static_libs: ["libaudioutils"],
     98         },
     99     }
    100 }
    101 
    102 cc_test {
    103     name: "errorlog_tests",
    104     host_supported: false,
    105 
    106     shared_libs: [
    107         "libcutils",
    108         "liblog",
    109     ],
    110     srcs: ["errorlog_tests.cpp"],
    111     cflags: [
    112         "-Wall",
    113         "-Werror",
    114         "-Wextra",
    115     ],
    116     target: {
    117         android: {
    118             shared_libs: ["libaudioutils"],
    119         },
    120         host: {
    121             static_libs: ["libaudioutils"],
    122         },
    123     }
    124 }
    125 
    126 cc_test {
    127     name: "powerlog_tests",
    128     host_supported: false,
    129 
    130     shared_libs: [
    131         "libcutils",
    132         "liblog",
    133     ],
    134     srcs: ["powerlog_tests.cpp"],
    135     cflags: [
    136         "-Wall",
    137         "-Werror",
    138         "-Wextra",
    139     ],
    140     target: {
    141         android: {
    142             shared_libs: ["libaudioutils"],
    143         },
    144         host: {
    145             static_libs: ["libaudioutils"],
    146         },
    147     }
    148 }
    149 
    150 cc_test {
    151     name: "simplelog_tests",
    152     host_supported: false,
    153 
    154     shared_libs: [
    155         "libcutils",
    156         "liblog",
    157     ],
    158     srcs: ["simplelog_tests.cpp"],
    159     cflags: [
    160         "-Wall",
    161         "-Werror",
    162         "-Wextra",
    163     ],
    164     target: {
    165         android: {
    166             shared_libs: ["libaudioutils"],
    167         },
    168         host: {
    169             static_libs: ["libaudioutils"],
    170         },
    171     }
    172 }
    173