From 04a99b3ebf79d71dfcc84134d671e634c8855849 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 20:55:59 +0000 Subject: [PATCH] Add tests/Makefile to .gitignore and untrack generated file Agent-Logs-Url: https://github.com/tbamud/tbamud/sessions/ff469e4b-880b-4326-85fd-1abc76bd80bc Co-authored-by: welcor <357770+welcor@users.noreply.github.com> --- .gitignore | 1 + tests/Makefile | 82 -------------------------------------------------- 2 files changed, 1 insertion(+), 82 deletions(-) delete mode 100644 tests/Makefile diff --git a/.gitignore b/.gitignore index dfe655b..3b611fd 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ config.status src/Makefile src/conf.h src/util/Makefile +tests/Makefile src/.accepted src/depend src/util/depend diff --git a/tests/Makefile b/tests/Makefile deleted file mode 100644 index 614c7f5..0000000 --- a/tests/Makefile +++ /dev/null @@ -1,82 +0,0 @@ -# Generated automatically from Makefile.in by configure. -# tests/Makefile.in -# Autoconf template — processed by configure to produce tests/Makefile. -# -# Build and run the tbaMUD unit-test suite. -# Usage (after running ./configure from the project root): -# -# cd tests && make # build all test binaries -# cd tests && make test # build and run all tests - -CC = gcc -MYFLAGS = -Wall -Wno-char-subscripts -Wno-unused-but-set-variable -CFLAGS = -g -O2 $(MYFLAGS) -LIBS = -lcrypt - -SRCDIR = ../src -UNITYDIR = vendor/unity - -# Include paths: -# ../src — mud headers and the generated conf.h -# vendor/unity — Unity framework headers -INCFLAGS = -I$(SRCDIR) -I$(UNITYDIR) - -# Suppress warnings that fire in generated stubs / vendored code -WARNFLAGS = -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable - -COMPILE = $(CC) $(CFLAGS) $(WARNFLAGS) $(INCFLAGS) - -# Common object files compiled into every test binary -UNITY_SRC = $(UNITYDIR)/unity.c -STUBS_SRC = test_stubs.c - -# tbaMUD source files used by the tests -UTILS_SRC = $(SRCDIR)/utils.c $(SRCDIR)/random.c - -# All test binaries -TESTS = test_utils test_random test_interpreter test_class - -.PHONY: all test clean - -all: $(TESTS) - -# --------------------------------------------------------------------------- -# test_utils — covers src/utils.c -# --------------------------------------------------------------------------- -test_utils: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) test_utils.c - $(COMPILE) -o $@ $^ $(LIBS) - -# --------------------------------------------------------------------------- -# test_random — covers src/random.c and rand_number/dice in src/utils.c -# --------------------------------------------------------------------------- -test_random: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) test_random.c - $(COMPILE) -o $@ $^ $(LIBS) - -# --------------------------------------------------------------------------- -# test_interpreter — covers string helpers in src/interpreter.c -# --------------------------------------------------------------------------- -test_interpreter: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) \ - $(SRCDIR)/interpreter.c test_interpreter.c - $(COMPILE) -o $@ $^ $(LIBS) - -# --------------------------------------------------------------------------- -# test_class — covers src/class.c -# --------------------------------------------------------------------------- -test_class: $(UNITY_SRC) $(STUBS_SRC) $(UTILS_SRC) \ - $(SRCDIR)/class.c test_class.c - $(COMPILE) -o $@ $^ $(LIBS) - -# --------------------------------------------------------------------------- -# Run all tests -# --------------------------------------------------------------------------- -test: $(TESTS) - @echo "==========================================" - @echo "Running tbaMUD unit tests" - @echo "==========================================" - @./test_utils && echo "[PASS] test_utils" || echo "[FAIL] test_utils" - @./test_random && echo "[PASS] test_random" || echo "[FAIL] test_random" - @./test_interpreter && echo "[PASS] test_interpreter" || echo "[FAIL] test_interpreter" - @./test_class && echo "[PASS] test_class" || echo "[FAIL] test_class" - -clean: - rm -f $(TESTS)