Files
Toy/makefile
Kayne Ruse 09e4cb7b03 Squashed: Added integration and standalone tests, read more
This wasn't an easy fix, as it was primarily the test pipelines that
were failing. I resorted to using forced pushes to run the CI, to try
and track down the problems.

The primary cause seems to be the differences in how each supported
platform handles file paths, specifically, slash vs. backslash.

I've also added gdb scripts to set up automated breakpoints, and to run
operations on them to check for issues - the 'gdb_init' files are mostly
empty for the time being.

commit a34b0ff5d407bbe7d70ff9504aa035ec6fbecb7c
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Oct 18 11:45:40 2024 +1100

    Restored the workflows

commit eb3d94f30d4dc4150139517f44cc874f2901124f
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Oct 18 11:35:39 2024 +1100

    I think the library path on macos is fixed

commit 964572b5e93c7cb464686f19ddbe3e9d315f391b
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Fri Oct 18 11:22:56 2024 +1100

    I think the file paths are fixed

commit 1721f3da7252b4063f4347926e800ef4f7c9bf4c
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Thu Oct 17 15:57:28 2024 +1100

    Added standalone tests

commit 90c783f4059d88f4a7bbaf18215a9b414f3ab66f
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Thu Oct 17 15:01:18 2024 +1100

    Trying to fix the integration test pipeline

commit fccced1396568a55c1385e2f1b04fedf7c2585a5
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Wed Oct 16 00:31:39 2024 +1100

    Workflow integration tests are not passing

commit 6b1e0d1e0f89291e89768bf6102f4f7ed4581496
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Tue Oct 15 20:07:20 2024 +1100

    Fixed file paths in workflow

commit c0f1ec78fe79a5abb34c3e05308236cb18c23b97
Author: Kayne Ruse <kayneruse@gmail.com>
Date:   Tue Oct 15 19:46:14 2024 +1100

    Moved example scripts into proper integration tests

    Also adjusted makefiles to allow easy invoking of the tests.

    Adjusted and updated CI to invoke tests correctly.

    Fixed #141
2024-10-18 12:04:29 +11:00

99 lines
2.2 KiB
Makefile

#compiler settings reference
#CC=gcc
#CFLAGS+=-std=c17 -g -Wall -Werror -Wno-unused-parameter -Wno-unused-function -Wno-unused-variable -Wformat=2
#LIBS+=-lm
#LDFLAGS+=
#directories
export TOY_SOURCEDIR=source
export TOY_REPLDIR=repl
export TOY_CASESDIR=tests/cases
export TOY_INTEGRATIONSDIR=tests/integrations
export TOY_BENCHMARKSDIR=tests/benchmarks
export TOY_OUTDIR=out
export TOY_OBJDIR=obj
#targets
#all:
.PHONY: source
source:
$(MAKE) -C source -k
.PHONY: repl
repl: source
$(MAKE) -C repl -k
#various kinds of available tests
.PHONY: tests
tests: clean test-cases test-integrations test-benchmarks
.PHONY: test-cases
test-cases:
$(MAKE) -C $(TOY_CASESDIR) -k
.PHONY: test-integrations
test-integrations:
$(MAKE) -C $(TOY_INTEGRATIONSDIR) -k
.PHONY: test-benchmarks
test-benchmarks:
$(MAKE) -C $(TOY_BENCHMARKSDIR) -k
#same as above, but with GDB
.PHONY: test-gdb
test-gdb: clean test-cases-gdb test-integrations-gdb test-benchmarks-gdb
.PHONY: test-cases-gdb
test-cases-gdb:
$(MAKE) -C $(TOY_CASESDIR) gdb -k
.PHONY: test-integrations-gdb
test-integrations-gdb:
$(MAKE) -C $(TOY_INTEGRATIONSDIR) gdb -k
.PHONY: test-benchmarks-gdb
test-benchmarks-gdb:
$(MAKE) -C $(TOY_BENCHMARKSDIR) gdb -k
#TODO: mustfail tests
#util targets
$(TOY_OUTDIR):
mkdir $(TOY_OUTDIR)
$(TOY_OBJDIR):
mkdir $(TOY_OBJDIR)
#util commands
.PHONY: clean
clean:
ifeq ($(shell uname),Linux)
find . -type f -name '*.o' -delete
find . -type f -name '*.a' -delete
find . -type f -name '*.exe' -delete
find . -type f -name '*.dll' -delete
find . -type f -name '*.lib' -delete
find . -type f -name '*.so' -delete
find . -type f -name '*.dylib' -delete
find . -type d -name 'out' -delete
find . -type d -name 'obj' -delete
else ifeq ($(OS),Windows_NT)
$(RM) *.o *.a *.exe *.dll *.lib *.so *.dylib
$(RM) out
$(RM) obj
else ifeq ($(shell uname),Darwin)
find . -type f -name '*.o' -delete
find . -type f -name '*.a' -delete
find . -type f -name '*.exe' -delete
find . -type f -name '*.dll' -delete
find . -type f -name '*.lib' -delete
find . -type f -name '*.so' -delete
find . -type f -name '*.dylib' -delete
find . -type d -name 'out' -delete
find . -type d -name 'obj' -delete
else
@echo "Deletion failed - what platform is this?"
endif