Commit 5541fb2f authored by Cyril SIX's avatar Cyril SIX
Browse files

MPPA - Running tests in parallel

parent 38b906f9
# Object files, in general
**.bin
**.out
**.tok
*.vo
*.glob
*.o
......
......@@ -3,6 +3,7 @@ TESTNAMES=simple call branch for forvar forvarl branchz branchzu
TESTS=$(addprefix $(DIR)/,$(TESTNAMES))
ELF=$(addsuffix .bin,$(TESTS))
TOK=$(addsuffix .tok,$(TESTS))
ASM=$(addsuffix .s,$(TESTS))
DEBUG:=$(if $(DEBUG),"-dall",)
......@@ -17,9 +18,14 @@ $(DIR)/%.bin: $(DIR)/%.s
$(DIR)/%.s: $(DIR)/%.c
ccomp $(DEBUG) -O0 -v -S $< -o $@
$(DIR)/%.tok: $(DIR)/%.bin FORCE
@bash check.sh $< $@
.PHONY: FORCE
FORCE:
.PHONY:
check: $(ELF)
bash check.sh $(ELF)
check: $(TOK)
.PHONY:
clean:
......@@ -33,6 +39,7 @@ clean:
rm -f $(DIR)/*.parsed.c
rm -f $(DIR)/*.rtl.?
rm -f $(DIR)/*.s
rm -f $(DIR)/*.tok
rm -f $(DIR)/output/*.out
rm -rf $(DIR)/profile/
rm -f $(ELF)
# $1: binary file to check
# $2: output check token
while [ $# -gt 0 ]; do
elffile="$1"
if [ ! -f $elffile ]; then
>&2 echo "ERROR: $elffile not found"
shift; continue
fi
elffile="$1"
token="$2"
dir="$(dirname $elffile)"
elf="$(basename $elffile)"
exp="$dir/output/$elf.exp"
out="$dir/output/$elf.out"
if [ ! -f $exp ]; then
>&2 echo "ERROR: $exp not found"
shift; continue
fi
if [ ! -f $elffile ]; then
>&2 echo "ERROR: $elffile not found"
shift; continue
fi
k1-cluster -- $elffile > $out
echo $? >> $out
if [ -f $token ]; then
echo "ALREADY PASSED: $elffile"
exit
fi
if ! diff $exp $out; then
>&2 echo "ERROR: $exp and $out differ"
shift; continue
fi
dir="$(dirname $elffile)"
elf="$(basename $elffile)"
exp="$dir/output/$elf.exp"
out="$dir/output/$elf.out"
if [ ! -f $exp ]; then
>&2 echo "ERROR: $exp not found"
shift; continue
fi
echo "PASSED: $elf"
shift
done
k1-cluster -- $elffile > $out
echo $? >> $out
if ! diff $exp $out; then
>&2 echo "ERROR: $exp and $out differ"
exit
#shift; continue
fi
echo "PASSED: $elf"
touch $token
#shift
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment