From 15c48118047c4fadfa944b4fd7d04b25e2cb6144 Mon Sep 17 00:00:00 2001 From: MadMaurice Date: Sat, 9 Sep 2023 14:45:47 +0200 Subject: [PATCH] tests - Sort tests into subdirectories --- Makeconf | 6 +++++- tests/{ => cpu}/test_cpu_exception.cpp | 0 tests/{ => cpu}/test_cpu_interrupts.cpp | 0 tests/{ => cpu}/test_cpu_prefix.cpp | 0 tests/{ => cpu}/test_cpu_simple.cpp | 0 tests/{ => cpu}/test_cpu_state.cpp | 0 tests/{ => memory}/test_bus.cpp | 0 tests/{ => memory}/test_memory_register.cpp | 0 tests/{ => memory}/test_ram.cpp | 0 9 files changed, 5 insertions(+), 1 deletion(-) rename tests/{ => cpu}/test_cpu_exception.cpp (100%) rename tests/{ => cpu}/test_cpu_interrupts.cpp (100%) rename tests/{ => cpu}/test_cpu_prefix.cpp (100%) rename tests/{ => cpu}/test_cpu_simple.cpp (100%) rename tests/{ => cpu}/test_cpu_state.cpp (100%) rename tests/{ => memory}/test_bus.cpp (100%) rename tests/{ => memory}/test_memory_register.cpp (100%) rename tests/{ => memory}/test_ram.cpp (100%) diff --git a/Makeconf b/Makeconf index 5f4ffd5..501c5d6 100644 --- a/Makeconf +++ b/Makeconf @@ -16,9 +16,13 @@ modules_libemu.a := memory/device.o \ modules_vgbc := main.o libemu.a verb_vgbc := link -modules_vgbc.test := $(patsubst %.cpp,%.o,$(wildcard tests/*.cpp)) libemu.a +sources_vgbc.test := $(shell find tests/ -name '*.cpp') +objects_vgbc.test := $(patsubst %.cpp,%.o,$(sources_vgbc.test)) +modules_vgbc.test := $(objects_vgbc.test) libemu.a verb_vgbc.test := link +$(objects_vgbc.test): CXX_FLAGS+=-I $(CURDIR)/tests + modules_vgbc.inspect := cartridge/inspector.o libemu.a verb_vgbc.inspect := link diff --git a/tests/test_cpu_exception.cpp b/tests/cpu/test_cpu_exception.cpp similarity index 100% rename from tests/test_cpu_exception.cpp rename to tests/cpu/test_cpu_exception.cpp diff --git a/tests/test_cpu_interrupts.cpp b/tests/cpu/test_cpu_interrupts.cpp similarity index 100% rename from tests/test_cpu_interrupts.cpp rename to tests/cpu/test_cpu_interrupts.cpp diff --git a/tests/test_cpu_prefix.cpp b/tests/cpu/test_cpu_prefix.cpp similarity index 100% rename from tests/test_cpu_prefix.cpp rename to tests/cpu/test_cpu_prefix.cpp diff --git a/tests/test_cpu_simple.cpp b/tests/cpu/test_cpu_simple.cpp similarity index 100% rename from tests/test_cpu_simple.cpp rename to tests/cpu/test_cpu_simple.cpp diff --git a/tests/test_cpu_state.cpp b/tests/cpu/test_cpu_state.cpp similarity index 100% rename from tests/test_cpu_state.cpp rename to tests/cpu/test_cpu_state.cpp diff --git a/tests/test_bus.cpp b/tests/memory/test_bus.cpp similarity index 100% rename from tests/test_bus.cpp rename to tests/memory/test_bus.cpp diff --git a/tests/test_memory_register.cpp b/tests/memory/test_memory_register.cpp similarity index 100% rename from tests/test_memory_register.cpp rename to tests/memory/test_memory_register.cpp diff --git a/tests/test_ram.cpp b/tests/memory/test_ram.cpp similarity index 100% rename from tests/test_ram.cpp rename to tests/memory/test_ram.cpp