fix: test

This commit is contained in:
源文雨 2024-04-16 20:59:47 +09:00
parent c27340adc0
commit e842e5b521
2 changed files with 6 additions and 5 deletions

View File

@ -33,8 +33,5 @@ jobs:
BUILD_MACHINE: linux BUILD_MACHINE: linux
GOARCH: amd64 GOARCH: amd64
run: | run: |
make -e test make -e install
cd build make -e runtest
ls -hl
ldd test
./test

View File

@ -10,6 +10,7 @@ BUILD_ARCH := x86_64
NDK_VERSION := 26.3.11579264 NDK_VERSION := 26.3.11579264
TARGET_SDK := android23 TARGET_SDK := android23
TARGET_ARCH := aarch64 # optional: armv7a i686 x86_64 TARGET_ARCH := aarch64 # optional: armv7a i686 x86_64
TEST_INSTALL_PATH := /usr/local/lib
CGO_ENABLED := 1 CGO_ENABLED := 1
GO_SRC := $(shell find . -name '*.go' | grep -v '_test.go$$') GO_SRC := $(shell find . -name '*.go' | grep -v '_test.go$$')
@ -47,6 +48,9 @@ tidy:
go mod tidy go mod tidy
dir: dir:
@if [ ! -d "$(BUILD_PATH)" ]; then mkdir $(BUILD_PATH); fi @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: clean:
@if [ -d "$(BUILD_PATH)" ]; then \ @if [ -d "$(BUILD_PATH)" ]; then \
rm -rf $(BUILD_PATH)/lib$(PROJECT_NAME).*; \ rm -rf $(BUILD_PATH)/lib$(PROJECT_NAME).*; \