diff --git a/testing/stressapptest/CMakeLists.txt b/testing/stressapptest/CMakeLists.txt index c9c075d3dc5..4a618c2a012 100644 --- a/testing/stressapptest/CMakeLists.txt +++ b/testing/stressapptest/CMakeLists.txt @@ -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 diff --git a/testing/stressapptest/Kconfig b/testing/stressapptest/Kconfig index 91f59eba10c..c56aeeae5a1 100644 --- a/testing/stressapptest/Kconfig +++ b/testing/stressapptest/Kconfig @@ -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 diff --git a/testing/stressapptest/Makefile b/testing/stressapptest/Makefile index 2cc05d5079a..e124860436d 100644 --- a/testing/stressapptest/Makefile +++ b/testing/stressapptest/Makefile @@ -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