Skip to content

Commit

Permalink
stressapptest: Add download step
Browse files Browse the repository at this point in the history
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
  • Loading branch information
W-M-R authored and xiaoxiang781216 committed Jan 10, 2025
1 parent 4e854cf commit a5a93c0
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 0 deletions.
34 changes: 34 additions & 0 deletions testing/stressapptest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,40 @@

if(CONFIG_TESTING_STRESSAPPTEST)

set(STRESSAPPTEST_DIR ${CMAKE_CURRENT_LIST_DIR}/stressapptest)

if(NOT EXISTS ${STRESSAPPTEST_DIR})

set(STRESSAPPTEST_VERSION ${CONFIG_TESTING_STRESSAPPTEST_VERSION})

FetchContent_Declare(
stressapptest
DOWNLOAD_NAME "v${STRESSAPPTEST_VERSION}.tar.gz"
DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}
URL "https://github.com/stressapptest/stressapptest/archive/refs/tags/v${STRESSAPPTEST_VERSION}.tar.gz"
SOURCE_DIR
${CMAKE_CURRENT_LIST_DIR}/stressapptest
BINARY_DIR
${CMAKE_BINARY_DIR}/stressapptest
CONFIGURE_COMMAND
""
BUILD_COMMAND
""
INSTALL_COMMAND
""
TEST_COMMAND
""
DOWNLOAD_NO_PROGRESS true
TIMEOUT 30)

FetchContent_GetProperties(stressapptest)

if(NOT stressapptest_POPULATED)
FetchContent_Populate(stressapptest)
endif()

endif()

set(SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/stressapptest/src)

set(SRCS
Expand Down
4 changes: 4 additions & 0 deletions testing/stressapptest/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ config TESTING_STRESSAPPTEST

if TESTING_STRESSAPPTEST

config TESTING_STRESSAPPTEST_VERSION
string "Version of stressapptest"
default "1.0.11"

config TESTING_STRESSAPPTEST_PRIORITY
int "Priority of stressapptest process"
default 100
Expand Down
15 changes: 15 additions & 0 deletions testing/stressapptest/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,21 @@

include $(APPDIR)/Make.defs

STRESSAPPTEST_VERSION=$(patsubst "%",%,$(CONFIG_TESTING_STRESSAPPTEST_VERSION))

v$(STRESSAPPTEST_VERSION).tar.gz:
$(call DOWNLOAD,https://github.com/stressapptest/stressapptest/archive/refs/tags/,$@)

stressapptest: v$(STRESSAPPTEST_VERSION).tar.gz
$(Q) tar -xf $<
$(Q) mv stressapptest-$(STRESSAPPTEST_VERSION) stressapptest

context:: stressapptest

distclean::
$(Q) $(DELFILE) v$(STRESSAPPTEST_VERSION).tar.gz
$(call DELDIR, stressapptest)

VPATH += stressapptest
VPATH += stressapptest/src
DEPPATH += --dep-path stressapptest
Expand Down

0 comments on commit a5a93c0

Please sign in to comment.