Skip to content

Commit

Permalink
fetch target1 from programtargets repo
Browse files Browse the repository at this point in the history
  • Loading branch information
danmatichuk committed Jun 15, 2024
1 parent d80eb5b commit 4437da1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
1 change: 1 addition & 0 deletions tests/.programtargets
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
6210ba50cfb764e439d3e8236c05aad688b027b8
1 change: 0 additions & 1 deletion tests/aarch32/.programtargets

This file was deleted.

21 changes: 21 additions & 0 deletions tests/ppc32/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,25 @@ CC=powerpc-linux-gnu-gcc
OD=powerpc-linux-gnu-objdump
EXTRA_TARGETS=

ifeq (,$(wildcard $(CHALLENGE_DIR)))
else

EXTRA_TARGETS+=scripted/target1

scripted/target1.%: ../.programtargets
$(call fetch,target1)

endif

.PHONY: scripted/target1

scripted:
mkdir -p scripted

scripted/target1: scripted scripted/target1.original.exe scripted/target1.args scripted/target1.pate

scripted/target1.script_run: scripted/target1
cd scripted; \
../../../pate.sh $(shell cat scripted/target1.args)

include ../template.mk
1 change: 1 addition & 0 deletions tests/ppc32/scripted/target1.expect
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Equivalent
4 changes: 4 additions & 0 deletions tests/template.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
.PHONY: all extras

define fetch
(((cd $(CHALLENGE_DIR) && git show $(shell cat ../.programtargets):tests/$1/$(notdir $@)) > $@) || (rm -f $@ && exit 1))
endef

extras: ${EXTRA_TARGETS}

all: $(notdir $(patsubst %original.c,%test,$(wildcard ../src/*.original.c))) $(addprefix ./build/,$(notdir $(patsubst %c,%i,$(wildcard ../src/*.c)))) extras
Expand Down

0 comments on commit 4437da1

Please sign in to comment.