b9874d0941
Add redbear-usb-storage-check in-guest binary that validates USB mass storage read and write I/O: discovers /scheme/disk/ devices, writes a test pattern to sector 2048, reads it back, verifies match, restores original content. Updates test-usb-storage-qemu.sh with write-proof verification step. Includes all accumulated Red Bear OS work: kernel patches, relibc patches, driver infrastructure, DRM/GPU, KDE recipes, firmware, validation tooling, build system hardening, and documentation.
34 lines
873 B
Makefile
34 lines
873 B
Makefile
BUILD?=.
|
|
ifeq ($(shell uname),Redox)
|
|
IS_REDOX=1
|
|
else
|
|
IS_REDOX=0
|
|
endif
|
|
|
|
include ./Makefile.tests.mk
|
|
|
|
CARGO_TEST?=cargo
|
|
TEST_RUNNER?=
|
|
|
|
.PHONY: all clean run run-once
|
|
|
|
all: run
|
|
|
|
clean:
|
|
rm -rf $(BUILD)/gen
|
|
|
|
run: $(BUILD)/bins_verify/relibc-tests $(BINS) $(EXPECT_BINS) $(EXPECT_INPUT_BINS)
|
|
@echo "\033[1;36;49mRunning tests\033[0m"
|
|
$(TEST_RUNNER) $< $(patsubst %,-s%,$(BINS)) $(EXPECT_BINS)
|
|
for exp in $(EXPECT_INPUT_BINS); \
|
|
do \
|
|
echo "# expect $$(readlink -e $${exp}.exp) $$(readlink -e $${exp}) #"; \
|
|
expect "$$(readlink -e $${exp}.exp)" "$$(readlink -e $${exp})" test args || exit $$?; \
|
|
done
|
|
|
|
run-once: $(BUILD)/bins_verify/relibc-tests $(BUILD)/$(TESTBIN)
|
|
@echo "\033[1;36;49mRunning single test $(TESTBIN) $*\033[0m"
|
|
@if [ -f "expected/$(TESTBIN).stdout" ]; then \
|
|
$(TEST_RUNNER) $< $(BUILD)/$(TESTBIN); \
|
|
else $(TEST_RUNNER) $< -s$(BUILD)/$(TESTBIN); fi
|