Merge branch 'testing'

This commit is contained in:
2024-08-09 23:28:21 -06:00
23 changed files with 587 additions and 28 deletions

View File

@@ -30,6 +30,12 @@ RUSTFLAGS += --extern getopt=build/o/libgetopt.rlib \
--extern strerror=build/o/libstrerror.rlib
CFLAGS += -I$(SYSEXITS)
# testing requires the absolute path to the bin directory set
BIN = build/bin
.PHONY: default
default: all test
.PHONY: all
all: dj false fop hru intcmp mm npc rpn scrut str strcmp swab true
@@ -52,9 +58,9 @@ install: dist
cp -r $(DESTDIR)/* /
.PHONY: test
test: build /tmp/getopt
test: all $(TESTS) /tmp/getopt
@echo $(TESTS)
/tmp/getopt
tests/posix-compat.sh
/tmp/getopt: src/libgetopt.rs
$(RUSTC) --test -o /tmp/getopt src/libgetopt.rs
@@ -150,3 +156,5 @@ build/bin/swab: src/swab.rs build rustlibs
true: build/bin/true
build/bin/true: src/true.c build
$(CC) $(CFLAGS) -o $@ src/true.c
include tests/tests.mk