Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cdash #58

Merged
merged 6 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ jobs:
mkdir build
cd build
cmake -DSOCMAKE_BUILD_TESTING=TRUE ../
make check
make check_cdash
20 changes: 20 additions & 0 deletions CTestConfig.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
## ENABLE_TESTING()
## INCLUDE(CTest)

set(CTEST_PROJECT_NAME SoCMake)
set(CTEST_NIGHTLY_START_TIME 01:00:00 UTC)

if(CMAKE_VERSION VERSION_GREATER 3.14)
set(CTEST_SUBMIT_URL https://my.cdash.org/submit.php?project=SoCMake)
else()
set(CTEST_DROP_METHOD "https")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=SoCMake")
endif()

set(CTEST_DROP_SITE_CDASH TRUE)
11 changes: 11 additions & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
cmake_minimum_required(VERSION 3.25)
project(SoCMake_testing)

include(CTest)

add_custom_target(check
COMMAND ctest $(JOBS) --output-on-failure
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../
)

add_custom_target(check_cdash
COMMAND ctest -D Nightly $(JOBS) --output-on-failure
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../
)

add_subdirectory(iverilog)
Expand Down
27 changes: 2 additions & 25 deletions tests/iverilog/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,25 +1,2 @@
cmake_minimum_required(VERSION 3.25)
project(iverilog_simple_test NONE)

add_ip(iverilog_simple_test
VENDOR tests
LIBRARY iverilog
VERSION 1.2.3
)

ip_sources(${IP} VERILOG
${PROJECT_SOURCE_DIR}/tb.v
)

ip_compile_definitions(${IP} VERILOG SOME_DEF1=100)
ip_include_directories(${IP} VERILOG ${PROJECT_SOURCE_DIR}/inc)

iverilog(${IP}
EXECUTABLE ${PROJECT_BINARY_DIR}/tb
)

include(CTest)

add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_BINARY_DIR}/tb)

add_dependencies(check ${IP}_iverilog)
add_subdirectory(iverilog_simple_test)
add_subdirectory(iverilog_multi_top)
25 changes: 25 additions & 0 deletions tests/iverilog/iverilog_multi_top/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
cmake_minimum_required(VERSION 3.25)
project(iverilog_multi_top NONE)

add_ip(iverilog_multi_top
VENDOR tests
LIBRARY iverilog
VERSION 1
)

ip_sources(${IP} VERILOG
${PROJECT_SOURCE_DIR}/top1.v
${PROJECT_SOURCE_DIR}/top2.v
)

iverilog(${IP}
TOP_MODULE top2
EXECUTABLE ${PROJECT_BINARY_DIR}/tb
)

include(CTest)

add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_BINARY_DIR}/tb)

add_dependencies(check ${IP}_iverilog)
add_dependencies(check_cdash ${IP}_iverilog)
6 changes: 6 additions & 0 deletions tests/iverilog/iverilog_multi_top/top1.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module top1;
initial begin
$display("Module top1\n");
$fatal();
end
endmodule
7 changes: 7 additions & 0 deletions tests/iverilog/iverilog_multi_top/top2.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module top2;
initial begin
$display("Module top2\n");
$finish();
end
endmodule

26 changes: 26 additions & 0 deletions tests/iverilog/iverilog_simple_test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
cmake_minimum_required(VERSION 3.25)
project(iverilog_simple_test NONE)

add_ip(iverilog_simple_test
VENDOR tests
LIBRARY iverilog
VERSION 1.2.3
)

ip_sources(${IP} VERILOG
${PROJECT_SOURCE_DIR}/tb.v
)

ip_compile_definitions(${IP} VERILOG SOME_DEF1=100)
ip_include_directories(${IP} VERILOG ${PROJECT_SOURCE_DIR}/inc)

iverilog(${IP}
EXECUTABLE ${PROJECT_BINARY_DIR}/tb
)

include(CTest)

add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_BINARY_DIR}/tb)

add_dependencies(check ${IP}_iverilog)
add_dependencies(check_cdash ${IP}_iverilog)
1 change: 1 addition & 0 deletions tests/iverilog/iverilog_simple_test/inc/header.vh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`define INCLUDED_NUM 55
File renamed without changes.
Loading