Skip to content

Commit a5a93c0

Browse files
W-M-Rxiaoxiang781216
authored andcommitted
stressapptest: Add download step
Signed-off-by: wangmingrong1 <[email protected]>
1 parent 4e854cf commit a5a93c0

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

testing/stressapptest/CMakeLists.txt

+34
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,40 @@
2222

2323
if(CONFIG_TESTING_STRESSAPPTEST)
2424

25+
set(STRESSAPPTEST_DIR ${CMAKE_CURRENT_LIST_DIR}/stressapptest)
26+
27+
if(NOT EXISTS ${STRESSAPPTEST_DIR})
28+
29+
set(STRESSAPPTEST_VERSION ${CONFIG_TESTING_STRESSAPPTEST_VERSION})
30+
31+
FetchContent_Declare(
32+
stressapptest
33+
DOWNLOAD_NAME "v${STRESSAPPTEST_VERSION}.tar.gz"
34+
DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}
35+
URL "https://github.com/stressapptest/stressapptest/archive/refs/tags/v${STRESSAPPTEST_VERSION}.tar.gz"
36+
SOURCE_DIR
37+
${CMAKE_CURRENT_LIST_DIR}/stressapptest
38+
BINARY_DIR
39+
${CMAKE_BINARY_DIR}/stressapptest
40+
CONFIGURE_COMMAND
41+
""
42+
BUILD_COMMAND
43+
""
44+
INSTALL_COMMAND
45+
""
46+
TEST_COMMAND
47+
""
48+
DOWNLOAD_NO_PROGRESS true
49+
TIMEOUT 30)
50+
51+
FetchContent_GetProperties(stressapptest)
52+
53+
if(NOT stressapptest_POPULATED)
54+
FetchContent_Populate(stressapptest)
55+
endif()
56+
57+
endif()
58+
2559
set(SRC_DIR ${CMAKE_CURRENT_LIST_DIR}/stressapptest/src)
2660

2761
set(SRCS

testing/stressapptest/Kconfig

+4
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ config TESTING_STRESSAPPTEST
1616

1717
if TESTING_STRESSAPPTEST
1818

19+
config TESTING_STRESSAPPTEST_VERSION
20+
string "Version of stressapptest"
21+
default "1.0.11"
22+
1923
config TESTING_STRESSAPPTEST_PRIORITY
2024
int "Priority of stressapptest process"
2125
default 100

testing/stressapptest/Makefile

+15
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,21 @@
2222

2323
include $(APPDIR)/Make.defs
2424

25+
STRESSAPPTEST_VERSION=$(patsubst "%",%,$(CONFIG_TESTING_STRESSAPPTEST_VERSION))
26+
27+
v$(STRESSAPPTEST_VERSION).tar.gz:
28+
$(call DOWNLOAD,https://github.com/stressapptest/stressapptest/archive/refs/tags/,$@)
29+
30+
stressapptest: v$(STRESSAPPTEST_VERSION).tar.gz
31+
$(Q) tar -xf $<
32+
$(Q) mv stressapptest-$(STRESSAPPTEST_VERSION) stressapptest
33+
34+
context:: stressapptest
35+
36+
distclean::
37+
$(Q) $(DELFILE) v$(STRESSAPPTEST_VERSION).tar.gz
38+
$(call DELDIR, stressapptest)
39+
2540
VPATH += stressapptest
2641
VPATH += stressapptest/src
2742
DEPPATH += --dep-path stressapptest

0 commit comments

Comments
 (0)