From e842e5b5219ca4bb82c4da9abc1559c56fb87c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Tue, 16 Apr 2024 20:59:47 +0900 Subject: [PATCH] fix: test --- .github/workflows/test.yml | 7 ++----- Makefile | 4 ++++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3234f20..16eb592 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,8 +33,5 @@ jobs: BUILD_MACHINE: linux GOARCH: amd64 run: | - make -e test - cd build - ls -hl - ldd test - ./test + make -e install + make -e runtest diff --git a/Makefile b/Makefile index 60881b4..503be59 100644 --- a/Makefile +++ b/Makefile @@ -10,6 +10,7 @@ BUILD_ARCH := x86_64 NDK_VERSION := 26.3.11579264 TARGET_SDK := android23 TARGET_ARCH := aarch64 # optional: armv7a i686 x86_64 +TEST_INSTALL_PATH := /usr/local/lib CGO_ENABLED := 1 GO_SRC := $(shell find . -name '*.go' | grep -v '_test.go$$') @@ -47,6 +48,9 @@ tidy: go mod tidy dir: @if [ ! -d "$(BUILD_PATH)" ]; then mkdir $(BUILD_PATH); fi +install: test + sudo cp $(BUILD_PATH)/lib$(PROJECT_NAME).so $(TEST_INSTALL_PATH)/ + sudo ldconfig clean: @if [ -d "$(BUILD_PATH)" ]; then \ rm -rf $(BUILD_PATH)/lib$(PROJECT_NAME).*; \