-
Notifications
You must be signed in to change notification settings - Fork 82
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
Showing
10 changed files
with
176 additions
and
1 deletion.
There are no files selected for viewing
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
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,28 @@ | ||
# Copyright (C) 2024 Toitware ApS. | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; version | ||
# 2.1 only. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# The license can be found in the file `LICENSE` in the top level | ||
# directory of this repository. | ||
|
||
cmake_minimum_required(VERSION 3.20.0) | ||
|
||
project(hw NONE) # No need for compilers. | ||
|
||
set(HW_TOIT_EXE "" CACHE FILEPATH "The executable used to run hw tests") | ||
|
||
if (NOT HW_TOIT_EXE) | ||
message(FATAL_ERROR "HW_TOIT_EXE not set") | ||
endif() | ||
|
||
enable_testing() | ||
|
||
add_subdirectory(pi) |
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,35 @@ | ||
# Copyright (C) 2024 Toitware ApS. | ||
# | ||
# This library is free software; you can redistribute it and/or | ||
# modify it under the terms of the GNU Lesser General Public | ||
# License as published by the Free Software Foundation; version | ||
# 2.1 only. | ||
# | ||
# This library is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
# Lesser General Public License for more details. | ||
# | ||
# The license can be found in the file `LICENSE` in the top level | ||
# directory of this repository. | ||
|
||
file(GLOB TOIT_TESTS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "*-test.toit") | ||
|
||
add_custom_target( | ||
check_pi | ||
COMMAND ${CMAKE_CTEST_COMMAND} -j1 -T test -C pi --output-on-failure | ||
USES_TERMINAL | ||
) | ||
|
||
foreach(file ${TOIT_TESTS}) | ||
get_filename_component(name ${file} NAME_WE) | ||
set(toit_file ${CMAKE_CURRENT_SOURCE_DIR}/${file}) | ||
set(test_name ${name}) | ||
|
||
add_test( | ||
NAME ${file} | ||
COMMAND ${HW_TOIT_EXE} ${toit_file} | ||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} | ||
CONFIGURATIONS pi | ||
) | ||
endforeach() |
File renamed without changes.
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,9 @@ | ||
sdk: ^2.0.0-alpha.144 | ||
prefixes: | ||
host: pkg-host | ||
packages: | ||
pkg-host: | ||
url: github.com/toitlang/pkg-host | ||
name: host | ||
version: 1.15.3 | ||
hash: 62393e8522b77eafbafe60b9817935266117daf6 |
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,4 @@ | ||
dependencies: | ||
host: | ||
url: github.com/toitlang/pkg-host | ||
version: ^1.15.3 |
File renamed without changes.
File renamed without changes.