diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 7b4f8e870..645902dbe 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -29,8 +29,7 @@ run_binary () { } build_tests() { - cmake $LOCAL_CHIPYARD_DIR/tests/ -S $LOCAL_CHIPYARD_DIR/tests/ -B $LOCAL_CHIPYARD_DIR/tests/build/ -D CMAKE_BUILD_TYPE=Debug - cmake --build $LOCAL_CHIPYARD_DIR/tests/build/ --target all + (cd $LOCAL_CHIPYARD_DIR/tests && cmake . && make) } case $1 in diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7d1898e07..88833a90e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -32,8 +32,6 @@ set(CMAKE_OBJCOPY "${TOOLCHAIN_PREFIX}objcopy") set(CMAKE_OBJDUMP "${TOOLCHAIN_PREFIX}objdump") set(CMAKE_SIZE "${TOOLCHAIN_PREFIX}size") - -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/..") set(CMAKE_EXECUTABLE_SUFFIX ".riscv") @@ -98,8 +96,8 @@ add_custom_target(dump ALL) # Function to add disassembly target for an executable function(add_dump_target target_name) add_custom_target(${target_name}-dump - BYPRODUCTS ${CMAKE_SOURCE_DIR}/${target_name}.dump - COMMAND ${CMAKE_OBJDUMP} -D $ > ${CMAKE_SOURCE_DIR}/${target_name}.dump + BYPRODUCTS ${CMAKE_BINARY_DIR}/${target_name}.dump + COMMAND ${CMAKE_OBJDUMP} -D $ > ${CMAKE_BINARY_DIR}/${target_name}.dump DEPENDS ${target_name} COMMENT "Generating disassembly for ${target_name}" )