naett.c

Tiny cross-platform HTTP / HTTPS client library in C.
git clone git://git.finwo.net/lib/naett.c
Log | Files | Refs | README | LICENSE

commit 7d59f32a698063bf0e7fe135f99e6dfb0fda2368
parent 877a4605c1f02117704b56511bc5bc91f05ab807
Author: Erik Agsjö <erik.agsjo@gmail.com>
Date:   Sun, 17 Sep 2023 21:00:50 +0200

Update android test project

Diffstat:
Mtestrig/android/app/build.gradle | 3++-
Mtestrig/android/app/src/androidTest/java/naett/test/NaettTests.java | 10++++++++--
Mtestrig/android/app/src/main/cpp/CMakeLists.txt | 16+---------------
Mtestrig/android/build.gradle | 2+-
Mtestrig/android/gradle/wrapper/gradle-wrapper.properties | 2+-
5 files changed, 13 insertions(+), 20 deletions(-)

diff --git a/testrig/android/app/build.gradle b/testrig/android/app/build.gradle @@ -16,7 +16,7 @@ android { targetSdk 29 externalNativeBuild { cmake { - arguments '-DANDROID_STL=c++_static', '-std=c++17' + arguments '-DANDROID_STL=c++_static' } } testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" @@ -36,6 +36,7 @@ android { packagingOptions { doNotStrip '**.so' } + debuggable true } } externalNativeBuild { diff --git a/testrig/android/app/src/androidTest/java/naett/test/NaettTests.java b/testrig/android/app/src/androidTest/java/naett/test/NaettTests.java @@ -2,12 +2,18 @@ package naett.test; import org.junit.Test; import static org.junit.Assert.assertTrue; +import static org.junit.Assert.fail; public class NaettTests { @Test public void naett_Test() { - System.loadLibrary("native-activity"); - assertTrue(runTests() != 0); + try { + System.loadLibrary("native-activity"); + assertTrue(runTests() != 0); + } catch (Error e) { + System.err.println(e.getMessage()); + fail(); + } } private native int runTests(); diff --git a/testrig/android/app/src/main/cpp/CMakeLists.txt b/testrig/android/app/src/main/cpp/CMakeLists.txt @@ -1,18 +1,4 @@ -# -# Copyright (C) The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# +project(naett) cmake_minimum_required(VERSION 3.4.1) diff --git a/testrig/android/build.gradle b/testrig/android/build.gradle @@ -11,7 +11,7 @@ buildscript { mavenCentral() } dependencies { - classpath "com.android.tools.build:gradle:7.0.3" + classpath 'com.android.tools.build:gradle:7.4.2' } } diff --git a/testrig/android/gradle/wrapper/gradle-wrapper.properties b/testrig/android/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists