-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6df4ccf
commit 3db8fe6
Showing
11 changed files
with
60 additions
and
154 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(test-nes-mmc1 LANGUAGES C) | ||
include(CTest) | ||
|
||
add_library(test-lib test-lib.c) | ||
|
||
function(add_mesen_test name) | ||
add_executable(${name} ${name}.c) | ||
target_link_libraries(${name} test-lib) | ||
add_test(NAME test-${name} COMMAND ${MESEN_COMMAND} --testrunner | ||
$<TARGET_FILE:${name}> ${CMAKE_CURRENT_SOURCE_DIR}/mesen.lua) | ||
endfunction() | ||
include(../test.cmake) | ||
|
||
add_mesen_test(minimal) | ||
|
||
add_mesen_test(chr-ram) | ||
add_mesen_test(chr-rom) | ||
|
||
function(add_no_compile_test target) | ||
add_test(NAME ${target}-no-compile COMMAND ${CMAKE_CTEST_COMMAND} | ||
--build-and-test ${CMAKE_CURRENT_SOURCE_DIR}/no-compile | ||
${CMAKE_CURRENT_BINARY_DIR}/no-compile/${target} | ||
--build-generator ${CMAKE_GENERATOR} | ||
--build-makeprogram ${CMAKE_MAKE_PROGRAM} | ||
--build-target ${target} | ||
--build-options | ||
-DLLVM_MOS=${LLVM_MOS} | ||
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | ||
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} | ||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
) | ||
set_property(TEST ${target}-no-compile PROPERTY WILL_FAIL YES) | ||
endfunction() | ||
|
||
add_no_compile_test(chr-rom-too-big) | ||
add_no_compile_test(chr-rom-non-pow2) | ||
add_subdirectory(no-compile) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON) | ||
|
||
project(test-nes-mmc1-nocompile LANGUAGES C) | ||
|
||
add_executable(chr-rom-too-big chr-rom-too-big.c) | ||
add_executable(chr-rom-non-pow2 chr-rom-non-pow2.c) | ||
add_no_compile_test(chr-rom-too-big) | ||
add_no_compile_test(chr-rom-non-pow2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(test-nes-mmc1-nocompile LANGUAGES C) | ||
|
||
add_executable(chr-rom-too-big chr-rom-too-big.c) | ||
add_executable(chr-rom-non-pow2 chr-rom-non-pow2.c) | ||
|
||
add_executable(chr-ram-too-big chr-ram-too-big.c) | ||
add_executable(chr-ram-uneven-banks chr-ram-uneven-banks.c) | ||
add_executable(chr-nvram-uneven-banks chr-nvram-uneven-banks.c) | ||
|
||
add_executable(prg-ram-too-big prg-ram-too-big.c) | ||
add_executable(prg-ram-uneven-banks prg-ram-uneven-banks.c) | ||
add_executable(prg-nvram-uneven-banks prg-nvram-uneven-banks.c) | ||
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON) | ||
|
||
add_no_compile_test(chr-rom-too-big) | ||
add_no_compile_test(chr-rom-non-pow2) | ||
add_no_compile_test(chr-ram-too-big) | ||
add_no_compile_test(chr-ram-uneven-banks) | ||
add_no_compile_test(chr-nvram-uneven-banks) | ||
add_no_compile_test(prg-ram-too-big) | ||
add_no_compile_test(prg-ram-uneven-banks) | ||
add_no_compile_test(prg-nvram-uneven-banks) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,7 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
|
||
project(test-nes-mmc3 LANGUAGES C) | ||
include(CTest) | ||
|
||
add_library(test-lib test-lib.c) | ||
|
||
function(add_mesen_test name) | ||
add_executable(${name} ${name}.c) | ||
target_link_libraries(${name} test-lib) | ||
add_test(NAME test-${name} COMMAND ${MESEN_COMMAND} --testrunner | ||
$<TARGET_FILE:${name}> ${CMAKE_CURRENT_SOURCE_DIR}/mesen.lua) | ||
endfunction() | ||
include(../test.cmake) | ||
|
||
add_mesen_test(minimal) | ||
|
||
function(add_no_compile_test target) | ||
add_test(NAME ${target}-no-compile COMMAND ${CMAKE_CTEST_COMMAND} | ||
--build-and-test ${CMAKE_CURRENT_SOURCE_DIR}/no-compile | ||
${CMAKE_CURRENT_BINARY_DIR}/no-compile/${target} | ||
--build-generator ${CMAKE_GENERATOR} | ||
--build-makeprogram ${CMAKE_MAKE_PROGRAM} | ||
--build-target ${target} | ||
--build-options | ||
-DLLVM_MOS=${LLVM_MOS} | ||
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | ||
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} | ||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
) | ||
set_property(TEST ${target}-no-compile PROPERTY WILL_FAIL YES) | ||
endfunction() | ||
|
||
#add_no_compile_test(chr-rom-too-big) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
cmake_minimum_required(VERSION 3.18) | ||
set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON) | ||
|
||
project(test-nes-mmc1-nocompile LANGUAGES C) | ||
|
||
add_executable(chr-rom-too-big chr-rom-too-big.c) | ||
add_executable(chr-rom-non-pow2 chr-rom-non-pow2.c) | ||
add_executable(chr-ram-too-big chr-ram-too-big.c) | ||
|
||
add_executable(prg-rom-too-big prg-rom-too-big.c) | ||
add_executable(prg-ram-too-big prg-ram-too-big.c) | ||
add_no_compile_test(chr-ram-too-big) | ||
add_no_compile_test(chr-rom-non-pow2) | ||
add_no_compile_test(chr-rom-too-big) | ||
add_no_compile_test(prg-rom-too-big) | ||
add_no_compile_test(prg-ram-too-big) |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
include(CTest) | ||
|
||
add_library(test-lib ${CMAKE_CURRENT_SOURCE_DIR}/../test-lib.c) | ||
|
||
function(add_mesen_test name) | ||
add_executable(${name} ${name}.c) | ||
target_link_libraries(${name} test-lib) | ||
add_test(NAME test-${name} COMMAND ${MESEN_COMMAND} --testrunner | ||
$<TARGET_FILE:${name}> ${CMAKE_CURRENT_SOURCE_DIR}/../mesen.lua) | ||
endfunction() | ||
|
||
function(add_mesen_test name) | ||
add_executable(${name} ${name}.c) | ||
target_link_libraries(${name} test-lib) | ||
add_test(NAME test-${name} COMMAND ${MESEN_COMMAND} --testrunner | ||
$<TARGET_FILE:${name}> ${CMAKE_CURRENT_SOURCE_DIR}/../mesen.lua) | ||
endfunction() | ||
|
||
function(add_no_compile_test target) | ||
add_executable(${target} ${target}.c) | ||
add_test(NAME ${target}-no-compile COMMAND ${CMAKE_CTEST_COMMAND} | ||
--build-and-test ${CMAKE_CURRENT_SOURCE_DIR}/.. | ||
${CMAKE_CURRENT_BINARY_DIR}/${target} | ||
--build-generator ${CMAKE_GENERATOR} | ||
--build-makeprogram ${CMAKE_MAKE_PROGRAM} | ||
--build-target ${target} | ||
--build-options | ||
-DLLVM_MOS=${LLVM_MOS} | ||
-DCMAKE_C_FLAGS=${CMAKE_C_FLAGS} | ||
-DCMAKE_CXX_FLAGS=${CMAKE_CXX_FLAGS} | ||
-DCMAKE_TOOLCHAIN_FILE=${CMAKE_TOOLCHAIN_FILE} | ||
) | ||
set_property(TEST ${target}-no-compile PROPERTY WILL_FAIL YES) | ||
endfunction() |