Android Studio with ndk and googletest

I am trying to set up my CI server to work with Android Studio. I want to run my unit tests for the NDK with a new UI. I am using GoogleTest and gcov works great for code coverage when I build from the command line. The problem I'm running into is that the test config, which in the UI works for java, but doesn't add any commands to the gradle build scripts. So I cannot figure out where to add my commands.

This is the source I got information on how to set up Unit Tests in Android Studio: http://rexstjohn.com/unit-testing-with-android-studio/

So here's the question, if I were to post something like this:   

    android {
         defaultConfig {
            testPackageName "com.test.foo"
            testInstrumentationRunner "android.test.InstrumentationTestRunner"
            testHandleProfiling true
            testFunctionalTest true
            ndk {
               moduleName "LexAppNative"
               stl "stlport_shared"
               abiFilters "armeabi-v7a"
            }
        }
        buildTypes {
           debug {
                ndk {
                     ldLibs "log -L / absolute / path / to / libs", "z", "m", "GLESv2", "OpenSLES", "opencv_java", "libgtest.a --coverage"
                     cFlags "-I / absolute / path / to / libs / includes", "--coverage"
                }
           release {
                ndk {
                    ldLibs "log -L / absolute / path / to / libs", "z", "m", "GLESv2", "OpenSLES", "opencv_java"
                    cFlags "-I / absolute / path / to / libs / includes"
                }
           }
       }
    

Will it give me what I want?

+1
android unit-testing android-ndk google-gdk


source to share


No one has answered this question yet

See similar questions:

147
Android studio, gradle and NDK
3
Android unittest googletest

or similar:

3606
Close / hide Android soft keyboard
3295
Why is the Android emulator so slow? How can we speed up the development of an Android emulator?
3288
Correct use cases for Android UserManager.isUserAGoat ()?
2609
Is there a unique identifier for an Android device?
2510
How to persist android activity state by persisting instance state?
2097
Is there a way to run Python on Android?
1844
What is "Context" on Android?
1345
Where can I put the "assets" folder in Android Studio?
1214
Rename package in Android Studio
1206
What is Gradle in Android Studio?



All Articles
Loading...
X
Show
Funny
Dev
Pics