From b3e0b30147be17a64e7c913f228f2a5549080d5f Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Fri, 21 Feb 2025 02:47:12 +0200 Subject: [PATCH] refactor(tests): remove obsolete SIMD and web test files Signed-off-by: EnderIce2 --- Userspace/apps/test/simd_test/Makefile | 36 ------------------- .../test/{simd_test => utest/simd}/simd.c | 2 +- .../apps/test/{web_test => utest/web}/web.c | 2 +- Userspace/apps/test/web_test/Makefile | 36 ------------------- 4 files changed, 2 insertions(+), 74 deletions(-) delete mode 100644 Userspace/apps/test/simd_test/Makefile rename Userspace/apps/test/{simd_test => utest/simd}/simd.c (80%) rename Userspace/apps/test/{web_test => utest/web}/web.c (99%) delete mode 100644 Userspace/apps/test/web_test/Makefile diff --git a/Userspace/apps/test/simd_test/Makefile b/Userspace/apps/test/simd_test/Makefile deleted file mode 100644 index 13dee6ab..00000000 --- a/Userspace/apps/test/simd_test/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -default: - $(error Do not run this Makefile directly!) - -S_SOURCES = $(shell find ./ -type f -name '*.S') -C_SOURCES = $(shell find ./ -type f -name '*.c') -CXX_SOURCES = $(shell find ./ -type f -name '*.cpp') - -OBJ = $(S_SOURCES:.S=.o) $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cpp=.o) - -FILENAME = $(notdir $(shell pwd)) -WARNCFLAG = -Wall -Wextra - -build: $(FILENAME).elf - cp $(FILENAME).elf $(WORKSPACE_DIR)/out/bin/$(FILENAME) - -# Use static linking -LDFLAGS += -static -fno-pic -fno-pie -Wl,-static - -$(FILENAME).elf: $(OBJ) - $(info Linking $@) - $(CC) $(LDFLAGS) $(SYSROOT) $(OBJ) -o $@ - -%.o: %.c $(HEADERS) - $(info Compiling $<) - $(CC) $(CFLAGS) $(WARNCFLAG) -std=c17 -c $< -o $@ - -%.o: %.cpp $(HEADERS) - $(info Compiling $<) - $(CXX) $(CFLAGS) $(WARNCFLAG) -std=c++20 -fexceptions -c $< -o $@ -fno-rtti - -%.o: %.S - $(info Compiling $<) - $(AS) -o $@ $< - -clean: - rm -f $(OBJ) $(FILENAME).elf diff --git a/Userspace/apps/test/simd_test/simd.c b/Userspace/apps/test/utest/simd/simd.c similarity index 80% rename from Userspace/apps/test/simd_test/simd.c rename to Userspace/apps/test/utest/simd/simd.c index 567a3b36..060e6c3e 100644 --- a/Userspace/apps/test/simd_test/simd.c +++ b/Userspace/apps/test/utest/simd/simd.c @@ -1,4 +1,4 @@ -int main(int, char *[], char *[]) +int simd_main(int, char *[], char *[]) { #if defined(__amd64__) || defined(__i386__) __asm__ __volatile__("movaps %%xmm1, %%xmm0\n" : : : "memory"); diff --git a/Userspace/apps/test/web_test/web.c b/Userspace/apps/test/utest/web/web.c similarity index 99% rename from Userspace/apps/test/web_test/web.c rename to Userspace/apps/test/utest/web/web.c index cab7416c..a8ca8053 100644 --- a/Userspace/apps/test/web_test/web.c +++ b/Userspace/apps/test/utest/web/web.c @@ -41,7 +41,7 @@ void HandleClient(int clientSocket) close(clientSocket); } -int main() +int web_main() { int serverSocket = socket(AF_INET, SOCK_STREAM, 0); if (serverSocket == -1) diff --git a/Userspace/apps/test/web_test/Makefile b/Userspace/apps/test/web_test/Makefile deleted file mode 100644 index 13dee6ab..00000000 --- a/Userspace/apps/test/web_test/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -default: - $(error Do not run this Makefile directly!) - -S_SOURCES = $(shell find ./ -type f -name '*.S') -C_SOURCES = $(shell find ./ -type f -name '*.c') -CXX_SOURCES = $(shell find ./ -type f -name '*.cpp') - -OBJ = $(S_SOURCES:.S=.o) $(C_SOURCES:.c=.o) $(CXX_SOURCES:.cpp=.o) - -FILENAME = $(notdir $(shell pwd)) -WARNCFLAG = -Wall -Wextra - -build: $(FILENAME).elf - cp $(FILENAME).elf $(WORKSPACE_DIR)/out/bin/$(FILENAME) - -# Use static linking -LDFLAGS += -static -fno-pic -fno-pie -Wl,-static - -$(FILENAME).elf: $(OBJ) - $(info Linking $@) - $(CC) $(LDFLAGS) $(SYSROOT) $(OBJ) -o $@ - -%.o: %.c $(HEADERS) - $(info Compiling $<) - $(CC) $(CFLAGS) $(WARNCFLAG) -std=c17 -c $< -o $@ - -%.o: %.cpp $(HEADERS) - $(info Compiling $<) - $(CXX) $(CFLAGS) $(WARNCFLAG) -std=c++20 -fexceptions -c $< -o $@ -fno-rtti - -%.o: %.S - $(info Compiling $<) - $(AS) -o $@ $< - -clean: - rm -f $(OBJ) $(FILENAME).elf