Home | History | Annotate | Download | only in libbrillo
      1 # Copyright (C) 2015 The Android Open Source Project
      2 #
      3 # Licensed under the Apache License, Version 2.0 (the "License");
      4 # you may not use this file except in compliance with the License.
      5 # You may obtain a copy of the License at
      6 #
      7 #      http://www.apache.org/licenses/LICENSE-2.0
      8 #
      9 # Unless required by applicable law or agreed to in writing, software
     10 # distributed under the License is distributed on an "AS IS" BASIS,
     11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     12 # See the License for the specific language governing permissions and
     13 # limitations under the License.
     14 
     15 # Default values for the USE flags. Override these USE flags from your product
     16 # by setting BRILLO_USE_* values. Note that we define local variables like
     17 # local_use_* to prevent leaking our default setting for other packages.
     18 
     19 LOCAL_PATH := $(call my-dir)
     20 
     21 libbrillo_CFLAGS := \
     22     -Wall \
     23     -Werror
     24 
     25 # Shared minijail library for target
     26 # ========================================================
     27 include $(CLEAR_VARS)
     28 LOCAL_CPP_EXTENSION := .cc
     29 LOCAL_MODULE := libbrillo-minijail
     30 LOCAL_SRC_FILES := brillo/minijail/minijail.cc
     31 LOCAL_SHARED_LIBRARIES := libchrome libbrillo libminijail
     32 LOCAL_STATIC_LIBRARIES := libgtest_prod
     33 LOCAL_CFLAGS := $(libbrillo_CFLAGS)
     34 LOCAL_CLANG := true
     35 LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
     36 include $(BUILD_SHARED_LIBRARY)
     37 
     38 # Run unit tests on target
     39 # ========================================================
     40 # We su shell because process tests try setting "illegal"
     41 # uid/gids and expecting failures, but root can legally
     42 # set those to any value.
     43 runtargettests: libbrillo_test
     44 	adb sync
     45 	adb shell su shell /data/nativetest/libbrillo_test/libbrillo_test
     46