Skip to content

Commit 1bf8e4b

Browse files
leosanitt-lowriscmarnovandermaas
authored andcommitted
test harness code
1 parent 0782bdf commit 1bf8e4b

File tree

2 files changed

+650
-0
lines changed

2 files changed

+650
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright lowRISC contributors.
2+
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
3+
# SPDX-License-Identifier: Apache-2.0
4+
set(INSTR_TESTS
5+
capability_modification_test_harness.cc
6+
)
7+
8+
foreach(INSTR_TESTS ${INSTR_TESTS})
9+
get_filename_component(NAME ${INSTR_TESTS} NAME_WE)
10+
11+
add_executable(${NAME} ${INSTR_TESTS})
12+
target_include_directories(${NAME} PRIVATE ${CHERIOT_SDK_INCLUDES} "${reisfmt_SOURCE_DIR}/include")
13+
target_link_libraries(${NAME} common)
14+
15+
add_custom_command(
16+
TARGET ${NAME} POST_BUILD
17+
COMMAND ${CMAKE_OBJCOPY} -O binary "$<TARGET_FILE:${NAME}>" "$<TARGET_FILE:${NAME}>.bin"
18+
COMMAND srec_cat "$<TARGET_FILE:${NAME}>.bin" -binary -offset 0x0000 -byte-swap 4 -o "$<TARGET_FILE:${NAME}>.vmem" -vmem
19+
VERBATIM
20+
)
21+
22+
install(TARGETS ${NAME})
23+
endforeach()

0 commit comments

Comments
 (0)