blob: ed87847bf31621ed21db294ecf9cfa8eba2ce8ae [file] [log] [blame]
# Copyright 2024 Googl4 LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Support for building cheriot-rtos functional tests
CHERIOT_TEST_DIR := $(OUT)/cheriot/test-suite
CHERIOT_TEST := $(CHERIOT_TEST_DIR)/release/cheriot/cheriot/release/test-suite
## Runs the cheriot-rtos testbench in renode
cheriot-testbench: renode cheriot_sim cheriot-test
$(RENODE_CMD) -e "\
\$$cheriot_elf =@${CHERIOT_TEST}; \
i @${CHERIOT_RESC_RELEASE}; \
pause; sysbus.cpu1 IsHalted false; start"
## Generates the cheriot-rtos test-suite firmware
cheriot-test:
${MAKE} \
CHERIOT_BOARD=sail \
CHERIOT_OUT_DIR="${OUT}/cheriot/test-suite" \
CHERIOT_FIRMWARE_SRC_DIR=${CHERIOT_SRC_DIR}/tests \
CHERIOT_FIRMWARE_RELEASE=$(CHERIOT_TEST) \
$(CHERIOT_TEST)
## Cleans all build artifacts for the cheriot-rtos test suite
cheriot-tests-clean:
rm -rf ${CHERIOT_TEST_DIR}
.PHONY:: cheriot-test cheriot-test-clean