Skip to content

Commit

Permalink
* move os-agnostic test code to its own folder
Browse files Browse the repository at this point in the history
* add last missting bounce test to macos
  • Loading branch information
blu committed Oct 16, 2021
1 parent e58e8ad commit 88c413f
Show file tree
Hide file tree
Showing 15 changed files with 422 additions and 543 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ reloc_add_aarch64.o: reloc_add_aarch64.c insn.h
vma.o: vma.cpp vma.h char_ptr_arr.h

all: $(TARGET)
$(MAKE) -C test_common all
$(MAKE) -C $(TEST_SUBDIR) all

clean:
rm -f $(TARGET) $(OBJ)
$(MAKE) -C test_common clean
$(MAKE) -C $(TEST_SUBDIR) clean
21 changes: 21 additions & 0 deletions test_common/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Differentiate between GAS and Apple clang
AS_VENDOR := $(word 1, $(shell $(AS) --version))
ifeq ($(AS_VENDOR), GNU)
ASFLAGS += --strip-local-absolute
defsym = --defsym $(1)=$(2)
else
ASFLAGS += --target=aarch64-linux-gnu
defsym = -Wa,-defsym,$(1)=$(2)
endif
REL := test_bounce_data_aosoa_alt_0.o \
test_bounce_data_aosoa_alt_1.o \
test_bounce_data_aosoa_alt_2.o \
test_bounce_data_aosoa_alt_3.o

test_bounce_data_aosoa_alt_3.o: test_bounce_data_aosoa_alt_3.s
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) -o $@ $^

all: $(REL)

clean:
rm -f $(REL)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 1 addition & 8 deletions test_linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@ REL := test_text.o \
test_bounce.o \
test_bounce_neon.o \
test_bounce_neon_aosoa.o \
test_bounce_neon_aosoa_bg.o \
test_bounce_data_aosoa_alt_0.o \
test_bounce_data_aosoa_alt_1.o \
test_bounce_data_aosoa_alt_2.o \
test_bounce_data_aosoa_alt_3.o
test_bounce_neon_aosoa_bg.o

test_bounce.o: test_bounce.s
$(AS) $(ASFLAGS) --defsym FB_DIM_X=$(shell tput cols) --defsym FB_DIM_Y=$(shell tput lines) --defsym FRAMES=1024 -o $@ $^
Expand All @@ -26,9 +22,6 @@ test_bounce_neon_aosoa.o: test_bounce_neon_aosoa.s
test_bounce_neon_aosoa_bg.o: test_bounce_neon_aosoa_bg.s
$(AS) $(ASFLAGS) --defsym FB_DIM_X=$(shell tput cols) --defsym FB_DIM_Y=$(shell tput lines) --defsym FRAMES=2048 -o $@ $^

test_bounce_data_aosoa_alt_3.o: test_bounce_data_aosoa_alt_3.s
$(AS) $(ASFLAGS) --defsym FB_DIM_X=$(shell tput cols) -o $@ $^

all: $(REL)

clean:
Expand Down
11 changes: 6 additions & 5 deletions test_linux/test_bounce_neon_aosoa.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/bin/bash
BUILD=..
COMMON=../test_common

make -C ${BUILD} all

Expand All @@ -8,9 +9,9 @@ make -C ${BUILD} all
# stdout; restore term cursor upon termination

tput civis
${BUILD}/elvenrel test_bounce_data_aosoa_alt_0.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel test_bounce_data_aosoa_alt_1.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel test_bounce_data_aosoa_alt_3.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa_bg.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_0.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_1.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_3.o test_bounce_neon_aosoa.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
${BUILD}/elvenrel ${COMMON}/test_bounce_data_aosoa_alt_2.o test_bounce_neon_aosoa_bg.o --filter /lib/aarch64-linux-gnu --filter [heap] --quiet
tput cnorm
11 changes: 4 additions & 7 deletions test_macos/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Support both GAS and Apple clang
# Differentiate between GAS and Apple clang
AS_VENDOR := $(word 1, $(shell $(AS) --version))
ifeq ($(AS_VENDOR), GNU)
ASFLAGS += --strip-local-absolute
Expand All @@ -18,10 +18,7 @@ REL := test_text.o \
test_bounce.o \
test_bounce_neon.o \
test_bounce_neon_aosoa.o \
test_bounce_data_aosoa_alt_0.o \
test_bounce_data_aosoa_alt_1.o \
test_bounce_data_aosoa_alt_2.o \
test_bounce_data_aosoa_alt_3.o
test_bounce_neon_aosoa_bg.o

stringx.o: ../stringx.s
$(AS) $(ASFLAGS) -o $@ $^
Expand All @@ -35,8 +32,8 @@ test_bounce_neon.o: test_bounce_neon.s
test_bounce_neon_aosoa.o: test_bounce_neon_aosoa.s
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) $(call defsym,FB_DIM_Y,$(shell tput lines)) $(call defsym,FRAMES,1024) -o $@ $^

test_bounce_data_aosoa_alt_3.o: test_bounce_data_aosoa_alt_3.s
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) -o $@ $^
test_bounce_neon_aosoa_bg.o: test_bounce_neon_aosoa_bg.s
$(AS) $(ASFLAGS) $(call defsym,FB_DIM_X,$(shell tput cols)) $(call defsym,FB_DIM_Y,$(shell tput lines)) $(call defsym,FRAMES,2048) -o $@ $^

all: $(REL)

Expand Down
82 changes: 0 additions & 82 deletions test_macos/test_bounce_data_aosoa_alt_0.s

This file was deleted.

72 changes: 0 additions & 72 deletions test_macos/test_bounce_data_aosoa_alt_1.s

This file was deleted.

Loading

0 comments on commit 88c413f

Please sign in to comment.