Skip to content

Commit

Permalink
test add move tests to test_cases and test_runners directories
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Jun 17, 2021
1 parent d6dbbaa commit d2e735e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 48 deletions.
12 changes: 6 additions & 6 deletions tests/Makefile
Expand Up @@ -4,6 +4,7 @@
CC ?= gcc
LVGL_DIR ?= ${shell pwd}/../..
LVGL_DIR_NAME ?= lvgl
OBJDIR = objs

WARNINGS = -Werror -Wall -Wextra \
-Wshadow -Wundef -Wmaybe-uninitialized -Wmissing-prototypes -Wpointer-arith -Wuninitialized \
Expand Down Expand Up @@ -45,14 +46,13 @@ OBJS = $(AOBJS) $(COBJS)

all: default

%.o: %.c
@$(CC) $(CFLAGS) -c $< -o $@
# @echo "CC $<"


$(OBJDIR)/%.o: %.c
@$(CC) $(CFLAGS) -c -o $@ $<
@echo "CC $<"

default: $(AOBJS) $(COBJS) $(MAINOBJ)
$(CC) -o $(BIN) $(MAINOBJ) $(AOBJS) $(COBJS) $(LDFLAGS)

clean:
rm -f $(BIN) $(AOBJS) $(COBJS) $(MAINOBJ)
find . -type f -name '*.o' -exec rm -f {} +
rm -f $(BIN)
1 change: 1 addition & 0 deletions tests/build.py
Expand Up @@ -24,6 +24,7 @@ def build(defines, test_name):
d_all += '"'
test_file_name = test_name + ".c"
test_file_runner_name = test_name + "_Runner.c"
test_file_runner_name = test_file_runner_name.replace("/test_cases/", "/test_runners/")
# -s makes it silence
cmd = "make -s -j BIN=test.bin MAINSRC=" + test_file_name + " TEST_SRC=" + test_file_runner_name + " LVGL_DIR_NAME=" + lvgldirname + " DEFINES=" + d_all + " OPTIMIZATION=" + optimization

Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 5 additions & 3 deletions tests/test.py
Expand Up @@ -2,9 +2,11 @@
import glob

def prepare():
os.system("rm src/test_*_Runner.c")
os.system("rm src/test_runners/test_*_Runner.c")
os.system("rm src/*.o")
files = glob.glob("./src/test_*.c")
files = glob.glob("./src/test_cases/test_*.c")
for f in files:
os.system("ruby unity/generate_test_runner.rb " + f + " config.yml")
r = f[:-2] + "_Runner.c"
r = r.replace("/test_cases/", "/test_runners/")
os.system("ruby unity/generate_test_runner.rb " + f + " " + r + " config.yml")
return files
39 changes: 0 additions & 39 deletions tests/test_obj_tree.c

This file was deleted.

0 comments on commit d2e735e

Please sign in to comment.