mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-03-06 12:23:08 +00:00
local cbindings tests
- Adds cbindings tests to the makefile so they can be run locally, eg with make testLibstorage or make testAll - Remove the separate workflow for running these tests in ci, opting instead to run them along with unit and integration tests
This commit is contained in:
parent
e375223500
commit
7b3eb027e2
5
.github/workflows/ci-reusable.yml
vendored
5
.github/workflows/ci-reusable.yml
vendored
@ -63,6 +63,11 @@ jobs:
|
||||
path: tests/integration/logs/
|
||||
retention-days: 1
|
||||
|
||||
## Part 3 Tests ##
|
||||
- name: Libstorage tests
|
||||
if: matrix.tests == 'libstorage' || matrix.tests == 'all'
|
||||
run: make -j${ncpu} testLibstorage
|
||||
|
||||
status:
|
||||
if: always()
|
||||
needs: [build]
|
||||
|
||||
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@ -100,14 +100,3 @@ jobs:
|
||||
with:
|
||||
os: linux
|
||||
nim_version: ${{ env.nim_version }}
|
||||
|
||||
- name: C Binding build
|
||||
run: |
|
||||
make -j${ncpu} update
|
||||
make -j${ncpu} libstorage
|
||||
|
||||
- name: C Binding test
|
||||
run: |
|
||||
cd examples/c
|
||||
gcc -o storage storage.c -L../../build -lstorage -Wl,-rpath,../../ -pthread
|
||||
LD_LIBRARY_PATH=../../build ./storage
|
||||
|
||||
16
Makefile
16
Makefile
@ -83,6 +83,9 @@ endif
|
||||
deps \
|
||||
libbacktrace \
|
||||
test \
|
||||
testAll \
|
||||
testIntegration \
|
||||
testLibstorage \
|
||||
update
|
||||
|
||||
ifeq ($(NIM_PARAMS),)
|
||||
@ -144,8 +147,19 @@ testIntegration: | build deps
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
$(ENV_SCRIPT) nim testIntegration $(TEST_PARAMS) $(NIM_PARAMS) --define:ws_resubscribe=240 build.nims
|
||||
|
||||
# Builds a C example that uses the libstorage C library and runs it
|
||||
testLibstorage: | build deps libstorage
|
||||
cd examples/c && \
|
||||
if [ "$(detected_OS)" = "Windows" ]; then \
|
||||
gcc -o storage.exe storage.c -L../../build -lstorage -pthread && \
|
||||
PATH=../../build:$$PATH ./storage.exe; \
|
||||
else \
|
||||
gcc -o storage storage.c -L../../build -lstorage -Wl,-rpath,../../ -pthread && \
|
||||
LD_LIBRARY_PATH=../../build ./storage; \
|
||||
fi
|
||||
|
||||
# Builds and runs all tests (except for Taiko L2 tests)
|
||||
testAll: | build deps
|
||||
testAll: | build deps testLibstorage
|
||||
echo -e $(BUILD_MSG) "build/$@" && \
|
||||
$(ENV_SCRIPT) nim testAll $(NIM_PARAMS) build.nims
|
||||
|
||||
|
||||
@ -109,10 +109,19 @@ integration_test () {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# outputs a libstorage test job
|
||||
libstorage_test () {
|
||||
job_tests="libstorage"
|
||||
job_includes=""
|
||||
job
|
||||
}
|
||||
|
||||
# outputs jobs for all test types
|
||||
all_tests () {
|
||||
unit_test
|
||||
integration_test
|
||||
libstorage_test
|
||||
}
|
||||
|
||||
# outputs jobs for the specified operating systems and all test types
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user