Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Added ADD_TEST option
Browse files Browse the repository at this point in the history
This option allows to include the test application that is used by
spawn.js
  • Loading branch information
Vsevolod Lebedev authored and Vadim Lomovtsev committed Feb 14, 2023
1 parent ef1d45c commit 724a6db
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions kos/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ qemubuild: ${ROOTFS_IMAGE}
-D CMAKE_TOOLCHAIN_FILE=$(SDK_PREFIX)/toolchain/share/toolchain-$(TARGET).cmake \
-D USE_TLS=$(USE_TLS) \
-D USE_KLOG=$(USE_KLOG) \
-D ADD_TEST=$(ADD_TEST) \
-D USE_EXECMGR=$(USE_EXECMGR) \
-D ROOTFS_SDCARD=$(ROOTFS_SDCARD) \
$(UART_OPTION) \
Expand Down
4 changes: 3 additions & 1 deletion kos/image_builder/einit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ else()
set (NODE_VFS_NETWORK_BACKEND "client:kl.VfsNet")
endif()

list (APPEND FILES $ENV{BUILD_ROOT}/image_builder/application/application)
if (ADD_TEST)
list (APPEND FILES $ENV{BUILD_ROOT}/image_builder/application/application)
endif()

if (NOT "$ENV{NODE_ARG}" STREQUAL "")
set (PROG_ARGS "args:")
Expand Down
3 changes: 3 additions & 0 deletions kos/rules/make-images.mk
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ endif
@echo "Please keep /etc/hosts and /etc/resolv.conf updated with respect to" \
" your OS config"
@cp -r $(BUILD_ROOT)/image_builder/resources/certs $@
ifeq ($(ADD_TEST), 1)
$(Q)cp -r $(BUILD_ROOT)/image_builder/application/application $@
endif

$(PART_0): $(ROOTFS_DIR)
@echo "Preparing partition for ramdisk ..."
Expand Down Expand Up @@ -89,6 +91,7 @@ realhw: image
-D CMAKE_INSTALL_PREFIX:STRING=$(INSTALL_PREFIX) \
-D CMAKE_TOOLCHAIN_FILE=$(SDK_PREFIX)/toolchain/share/toolchain-$(TARGET).cmake \
-D USE_TLS=$(USE_TLS) \
-D ADD_TEST=$(ADD_TEST) \
-D USE_KLOG=$(USE_KLOG) \
-D USE_EXECMGR=$(USE_EXECMGR) \
$(UART_OPTION) \
Expand Down
2 changes: 1 addition & 1 deletion kos/rules/make-run-tests.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ test-addon:

.PHONY: test-spawn
test-spawn: test-application-for-spawn
$(Q)$(MAKE) run NODE_ARG='\"/opt/node/test/kos/spawn.js\"'
$(Q)$(MAKE) run NODE_ARG='\"/opt/node/test/kos/spawn.js\"' ADD_TEST=1

INCLUDEDIR = -I $(SDK_PREFIX)/toolchain/aarch64-kos/include/c++/9.2.1 \
-I $(SDK_PREFIX)/toolchain/aarch64-kos/include \
Expand Down

0 comments on commit 724a6db

Please sign in to comment.