Skip to content

Commit dafb467

Browse files
author
Devang Patel
committed
Add report description for dbgopt.
git-svn-id: https://llvm.org/svn/llvm-project/test-suite/trunk@142362 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent fb80057 commit dafb467

File tree

2 files changed

+51
-10
lines changed

2 files changed

+51
-10
lines changed

TEST.dbgopt.Makefile

Lines changed: 35 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,15 @@ Output/%.s: %.c Output/.dir $(INCLUDES)
2222
-S ${PROJ_SRC_DIR}/$*.c -o Output/$*.first.s
2323
-$(LLVMCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os \
2424
-fno-verbose-asm -S ${PROJ_SRC_DIR}/$*.c -o Output/$*.second.s
25+
echo "---------------------------------------------------------------" \
26+
> Output/$*.dbgopt.report.txt; \
27+
echo ">>> ========= '$*' Program" >> Output/$*.dbgopt.report.txt; \
28+
echo "---------------------------------------------------------------\n"\
29+
>> Output/$*.dbgopt.report.txt;
2530
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
26-
echo "--------- TEST-PASS: $*" > Output/$*.dbgopt.report.txt; \
31+
echo "TEST: PASS" >> Output/$*.dbgopt.report.txt; \
2732
else \
28-
echo "--------- TEST-FAIL: $*" > Output/$*.dbgopt.report.txt; \
33+
echo "TEST: FAIL" >> Output/$*.dbgopt.report.txt; \
2934
fi
3035

3136
Output/%.s: %.cpp Output/.dir $(INCLUDES)
@@ -34,10 +39,15 @@ Output/%.s: %.cpp Output/.dir $(INCLUDES)
3439
-S ${PROJ_SRC_DIR}/$*.cpp -o Output/$*.first.s
3540
-$(LLVMCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S \
3641
-fno-verbose-asm ${PROJ_SRC_DIR}/$*.cpp -o Output/$*.second.s
42+
echo "---------------------------------------------------------------" \
43+
> Output/$*.dbgopt.report.txt; \
44+
echo ">>> ========= '$*' Program" >> Output/$*.dbgopt.report.txt; \
45+
echo "---------------------------------------------------------------\n"\
46+
>> Output/$*.dbgopt.report.txt;
3747
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
38-
echo "--------- TEST-PASS: $*" > Output/$*.dbgopt.report.txt; \
48+
echo "TEST: PASS" >> Output/$*.dbgopt.report.txt; \
3949
else \
40-
echo "--------- TEST-FAIL: $*" > Output/$*.dbgopt.report.txt; \
50+
echo "TEST: FAIL" >> Output/$*.dbgopt.report.txt; \
4151
fi
4252

4353
Output/%.s: %.cc Output/.dir $(INCLUDES)
@@ -46,10 +56,15 @@ Output/%.s: %.cc Output/.dir $(INCLUDES)
4656
-S ${PROJ_SRC_DIR}/$*.cc -o Output/$*.first.s
4757
-$(LLVMCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S \
4858
-fno-verbose-asm ${PROJ_SRC_DIR}/$*.cc -o Output/$*.second.s
59+
echo "---------------------------------------------------------------" \
60+
> Output/$*.dbgopt.report.txt; \
61+
echo ">>> ========= '$*' Program" >> Output/$*.dbgopt.report.txt; \
62+
echo "---------------------------------------------------------------\n"\
63+
>> Output/$*.dbgopt.report.txt;
4964
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
50-
echo "--------- TEST-PASS: $*" > Output/$*.dbgopt.report.txt; \
65+
echo "TEST: PASS" >> Output/$*.dbgopt.report.txt; \
5166
else \
52-
echo "--------- TEST-FAIL: $*" > Output/$*.dbgopt.report.txt; \
67+
echo "TEST: FAIL" >> Output/$*.dbgopt.report.txt; \
5368
fi
5469

5570
Output/%.s: %.m Output/.dir $(INCLUDES)
@@ -58,10 +73,15 @@ Output/%.s: %.m Output/.dir $(INCLUDES)
5873
-S ${PROJ_SRC_DIR}/$*.m -o Output/$*.first.s
5974
-$(LLVMCC) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S \
6075
-fno-verbose-asm ${PROJ_SRC_DIR}/$*.m -o Output/$*.second.s
76+
echo "---------------------------------------------------------------" \
77+
> Output/$*.dbgopt.report.txt; \
78+
echo ">>> ========= '$*' Program" >> Output/$*.dbgopt.report.txt; \
79+
echo "---------------------------------------------------------------\n"\
80+
>> Output/$*.dbgopt.report.txt;
6181
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
62-
echo "--------- TEST-PASS: $*" > Output/$*.dbgopt.report.txt; \
82+
echo "TEST: PASS" >> Output/$*.dbgopt.report.txt; \
6383
else \
64-
echo "--------- TEST-FAIL: $*" > Output/$*.dbgopt.report.txt; \
84+
echo "TEST: FAIL" >> Output/$*.dbgopt.report.txt; \
6585
fi
6686

6787
Output/%.s: %.mm Output/.dir $(INCLUDES)
@@ -70,10 +90,15 @@ Output/%.s: %.mm Output/.dir $(INCLUDES)
7090
-S ${PROJ_SRC_DIR}/$*.mm -o Output/$*.first.s
7191
-$(LLVMCC) $(CPPFLAGS) $(CFLAGS) $(LOPTFLAGS) $(X_TARGET_FLAGS) -Os -S \
7292
-fno-verbose-asm ${PROJ_SRC_DIR}/$*.mm -o Output/$*.second.s
93+
echo "---------------------------------------------------------------" \
94+
> Output/$*.dbgopt.report.txt; \
95+
echo ">>> ========= '$*' Program" >> Output/$*.dbgopt.report.txt; \
96+
echo "---------------------------------------------------------------\n"\
97+
>> Output/$*.dbgopt.report.txt;
7398
@-if diff Output/$*.first.s Output/$*.second.s > $@; then \
74-
echo "--------- TEST-PASS: $*" > Output/$*.dbgopt.report.txt; \
99+
echo "TEST: PASS" >> Output/$*.dbgopt.report.txt; \
75100
else \
76-
echo "--------- TEST-FAIL: $*" > Output/$*.dbgopt.report.txt; \
101+
echo "TEST: FAIL" >> Output/$*.dbgopt.report.txt; \
77102
fi
78103

79104
Asms := $(sort $(addsuffix .s, $(notdir $(basename $(Source)))))

TEST.dbgopt.report

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
##=== TEST.dbgopt.report - Report description for dbgopt -------*- perl -*-===##
2+
#
3+
# This file defines a report to be generated for TEST=dbgopt tests.
4+
#
5+
##===----------------------------------------------------------------------===##
6+
7+
8+
# These are the columns for the report. The first entry is the header for the
9+
# column, the second is the regex to use to match the value. Empty list create
10+
# separators, and closures may be put in for custom processing.
11+
(
12+
# Name
13+
["Program" , '\'([^\']+)\' Program'],
14+
[],
15+
["Result" , 'TEST: (PASS|FAIL)']
16+
);

0 commit comments

Comments
 (0)