From 4c4c403ea61ddc4880da76abc77a93be6bbf0a3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Sat, 14 Sep 2024 22:51:34 +0200 Subject: [PATCH 1/6] enable CDash result upload --- .github/workflows/testing.yml | 2 +- CTestConfig.cmake | 20 ++++++++++++++++++++ tests/CMakeLists.txt | 6 ++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 CTestConfig.cmake diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 84684fe..ed1711b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -38,4 +38,4 @@ jobs: mkdir build cd build cmake -DSOCMAKE_BUILD_TESTING=TRUE ../ - make check + make check_dash diff --git a/CTestConfig.cmake b/CTestConfig.cmake new file mode 100644 index 0000000..d1c139f --- /dev/null +++ b/CTestConfig.cmake @@ -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) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index f079504..a277373 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,7 +1,13 @@ +include(CTest) + add_custom_target(check COMMAND ctest $(JOBS) --output-on-failure ) +add_custom_target(check_cdash + COMMAND ctest $(JOBS) --output-on-failure -D Continous + ) + add_subdirectory(iverilog) add_subdirectory(vhier) add_subdirectory(peakrdl) From 23b4f072fec70aabbce496b25290429293c056b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Sat, 14 Sep 2024 22:53:29 +0200 Subject: [PATCH 2/6] typo --- .github/workflows/testing.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index ed1711b..77b13cb 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -38,4 +38,4 @@ jobs: mkdir build cd build cmake -DSOCMAKE_BUILD_TESTING=TRUE ../ - make check_dash + make check_cdash From 2ea3ea2578435764c58322dbddd14b02cdc82bcf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Sat, 14 Sep 2024 22:55:05 +0200 Subject: [PATCH 3/6] fix typo --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index a277373..9b41e8c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -5,7 +5,7 @@ add_custom_target(check ) add_custom_target(check_cdash - COMMAND ctest $(JOBS) --output-on-failure -D Continous + COMMAND ctest $(JOBS) --output-on-failure -D Continuous ) add_subdirectory(iverilog) From 4a3dccb22e1fff463e2c111ddd7d466c67615685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Sat, 14 Sep 2024 23:19:33 +0200 Subject: [PATCH 4/6] fix cdash --- tests/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 9b41e8c..37c2d20 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,11 +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 $(JOBS) --output-on-failure -D Continuous + COMMAND ctest -D Continuous $(JOBS) --output-on-failure + WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../ ) add_subdirectory(iverilog) From 04c603c3abb254b3cd1a1f375dd704953466a43a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Sat, 14 Sep 2024 23:22:35 +0200 Subject: [PATCH 5/6] try Nightly instead of Continuous --- tests/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 37c2d20..ca5c2f8 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,7 +9,7 @@ add_custom_target(check ) add_custom_target(check_cdash - COMMAND ctest -D Continuous $(JOBS) --output-on-failure + COMMAND ctest -D Nightly $(JOBS) --output-on-failure WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/../ ) From d8290241fe98d3aa36e3f344fb481a8db89a7e5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Sat, 14 Sep 2024 23:33:02 +0200 Subject: [PATCH 6/6] fix iverilog tests --- tests/iverilog/CMakeLists.txt | 27 ++----------------- .../iverilog_multi_top/CMakeLists.txt | 25 +++++++++++++++++ .../{ => iverilog_multi_top}/inc/header.vh | 0 tests/iverilog/iverilog_multi_top/top1.v | 6 +++++ tests/iverilog/iverilog_multi_top/top2.v | 7 +++++ .../iverilog_simple_test/CMakeLists.txt | 26 ++++++++++++++++++ .../iverilog_simple_test/inc/header.vh | 1 + .../iverilog/{ => iverilog_simple_test}/tb.v | 0 8 files changed, 67 insertions(+), 25 deletions(-) create mode 100644 tests/iverilog/iverilog_multi_top/CMakeLists.txt rename tests/iverilog/{ => iverilog_multi_top}/inc/header.vh (100%) create mode 100644 tests/iverilog/iverilog_multi_top/top1.v create mode 100644 tests/iverilog/iverilog_multi_top/top2.v create mode 100644 tests/iverilog/iverilog_simple_test/CMakeLists.txt create mode 100644 tests/iverilog/iverilog_simple_test/inc/header.vh rename tests/iverilog/{ => iverilog_simple_test}/tb.v (100%) diff --git a/tests/iverilog/CMakeLists.txt b/tests/iverilog/CMakeLists.txt index 85af082..08da783 100644 --- a/tests/iverilog/CMakeLists.txt +++ b/tests/iverilog/CMakeLists.txt @@ -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) diff --git a/tests/iverilog/iverilog_multi_top/CMakeLists.txt b/tests/iverilog/iverilog_multi_top/CMakeLists.txt new file mode 100644 index 0000000..83bbe47 --- /dev/null +++ b/tests/iverilog/iverilog_multi_top/CMakeLists.txt @@ -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) diff --git a/tests/iverilog/inc/header.vh b/tests/iverilog/iverilog_multi_top/inc/header.vh similarity index 100% rename from tests/iverilog/inc/header.vh rename to tests/iverilog/iverilog_multi_top/inc/header.vh diff --git a/tests/iverilog/iverilog_multi_top/top1.v b/tests/iverilog/iverilog_multi_top/top1.v new file mode 100644 index 0000000..10312c1 --- /dev/null +++ b/tests/iverilog/iverilog_multi_top/top1.v @@ -0,0 +1,6 @@ +module top1; + initial begin + $display("Module top1\n"); + $fatal(); + end +endmodule diff --git a/tests/iverilog/iverilog_multi_top/top2.v b/tests/iverilog/iverilog_multi_top/top2.v new file mode 100644 index 0000000..6456bb2 --- /dev/null +++ b/tests/iverilog/iverilog_multi_top/top2.v @@ -0,0 +1,7 @@ +module top2; + initial begin + $display("Module top2\n"); + $finish(); + end +endmodule + diff --git a/tests/iverilog/iverilog_simple_test/CMakeLists.txt b/tests/iverilog/iverilog_simple_test/CMakeLists.txt new file mode 100644 index 0000000..03cc0bd --- /dev/null +++ b/tests/iverilog/iverilog_simple_test/CMakeLists.txt @@ -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) diff --git a/tests/iverilog/iverilog_simple_test/inc/header.vh b/tests/iverilog/iverilog_simple_test/inc/header.vh new file mode 100644 index 0000000..2e493ca --- /dev/null +++ b/tests/iverilog/iverilog_simple_test/inc/header.vh @@ -0,0 +1 @@ +`define INCLUDED_NUM 55 diff --git a/tests/iverilog/tb.v b/tests/iverilog/iverilog_simple_test/tb.v similarity index 100% rename from tests/iverilog/tb.v rename to tests/iverilog/iverilog_simple_test/tb.v