Skip to content

Commit

Permalink
Allow deselecting SDL runs
Browse files Browse the repository at this point in the history
  • Loading branch information
kulp committed Sep 2, 2021
1 parent 9d46e68 commit 0a4e0c6
Showing 1 changed file with 34 additions and 26 deletions.
60 changes: 34 additions & 26 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,13 @@ set_tests_properties(
check_std_outputs(NAME "deref zero failure" COMMAND tsim INPUT deref.texe PROPERTIES WILL_FAIL TRUE)
check_std_outputs(NAME "deref zero success" COMMAND tsim ARGS -rzero_word INPUT deref.texe PROPERTIES WILL_FAIL FALSE)

file(GLOB RUNS test/run/*.tas test/run/sdl/*.tas)
file(GLOB RUNS test/run/*.tas)
file(GLOB SDL_RUNS test/run/sdl/*.tas)
if (SDL)
list(APPEND RUNS ${SDL_RUNS})
set(TSIM_EXTRA_ARGS "-@ ${CMAKE_SOURCE_DIR}/plugins/sdl.rcp")
endif()

# We will treat reloc_set and reloc_shifts specially, later.
list(REMOVE_ITEM RUNS ${CMAKE_SOURCE_DIR}/test/run/reloc_set.tas ${CMAKE_SOURCE_DIR}/test/run/reloc_shifts.tas)
foreach(run_path ${RUNS})
Expand All @@ -426,7 +432,7 @@ foreach(run_path ${RUNS})
check_std_outputs(
NAME "run ${run}"
COMMAND tsim
ARGS -p tsim.dump_end_state=1 -p paths.share=${CMAKE_SOURCE_DIR}/ -@ ${CMAKE_SOURCE_DIR}/plugins/sdl.rcp
ARGS -p tsim.dump_end_state=1 -p paths.share=${CMAKE_SOURCE_DIR}/ ${TSIM_EXTRA_ARGS}
INPUT "${run}.texe"
PROPERTIES
ENVIRONMENT SDL_VIDEODRIVER=dummy
Expand Down Expand Up @@ -485,30 +491,32 @@ foreach(flavor set shifts)

endforeach()

# This "foreach" is just a scoping mechanism, dedicated to bm_mults.
foreach(run_path ex/bm_mults.texe)
get_filename_component(run "${run_path}" NAME_WLE)

check_std_outputs(
NAME "run ${run}"
COMMAND tsim
ARGS -p tsim.dump_end_state=1 -p paths.share=${CMAKE_SOURCE_DIR}/ -@ ${CMAKE_SOURCE_DIR}/plugins/sdl.rcp
INPUT "${run_path}"
PROPERTIES
ENVIRONMENT SDL_VIDEODRIVER=dummy
)

# TODO this function ends up supplying vvp an extra .texe argument due to
# the use of INPUT; we allow this for now since it seems harmless, and it
# provides us the dependency linkage we need.
check_std_outputs(
NAME "run ${run} icarus"
COMMAND vvp
ARGS -M "${TENYR_LEGACY_BUILD_DIR}" -m vpidevices -N "${CMAKE_SOURCE_DIR}/hw/icarus/tenyr" "+LOAD=${run_path}" +DUMPENDSTATE
INPUT "${run}.texe"
)

endforeach()
if (SDL)
# This "foreach" is just a scoping mechanism, dedicated to bm_mults.
foreach(run_path ex/bm_mults.texe)
get_filename_component(run "${run_path}" NAME_WLE)

check_std_outputs(
NAME "run ${run}"
COMMAND tsim
ARGS -p tsim.dump_end_state=1 -p paths.share=${CMAKE_SOURCE_DIR}/ -@ ${CMAKE_SOURCE_DIR}/plugins/sdl.rcp
INPUT "${run_path}"
PROPERTIES
ENVIRONMENT SDL_VIDEODRIVER=dummy
)

# TODO this function ends up supplying vvp an extra .texe argument due to
# the use of INPUT; we allow this for now since it seems harmless, and it
# provides us the dependency linkage we need.
check_std_outputs(
NAME "run ${run} icarus"
COMMAND vvp
ARGS -M "${TENYR_LEGACY_BUILD_DIR}" -m vpidevices -N "${CMAKE_SOURCE_DIR}/hw/icarus/tenyr" "+LOAD=${run_path}" +DUMPENDSTATE
INPUT "${run}.texe"
)

endforeach()
endif()

file(GLOB OPS test/op/*.tas)
foreach(op_path ${OPS})
Expand Down

0 comments on commit 0a4e0c6

Please sign in to comment.