Skip to content

Commit

Permalink
Add test that set strong symbols by default.
Browse files Browse the repository at this point in the history
Bugs: android/ndk#837
Test: ./run_tests.py –rebuild –filter weak_symbols_off_by_default
Change-Id: I99e15f666b157e1ec6a7eaeaf97e65f80676105b
  • Loading branch information
ZijunZhaoCCK committed Oct 12, 2022
1 parent 5c73982 commit f2df276
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/device/weak_symbols_off_by_default/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 3.22.1)
project(WeakSymbolsBuildSupport CXX)
add_executable(weak_symbols jni/weak_symbols.cpp)
7 changes: 7 additions & 0 deletions tests/device/weak_symbols_off_by_default/jni/Android.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)
LOCAL_MODULE := weak_symbols
LOCAL_SRC_FILES := weak_symbols.cpp
LOCAL_LDLIBS := -landroid
include $(BUILD_EXECUTABLE)
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APP_STL := c++_static
6 changes: 6 additions & 0 deletions tests/device/weak_symbols_off_by_default/jni/weak_symbols.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#include <android/trace.h>

int main(int, char**) {
ATrace_beginAsyncSection("ndk::asyncBeginEndSection", 0);
return 0;
}
2 changes: 2 additions & 0 deletions tests/device/weak_symbols_off_by_default/test_config.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def is_negative_test() -> bool:
return True

0 comments on commit f2df276

Please sign in to comment.