Quick Search:

View

Revision:
Expand:  
Changeset: MAIN:plunky:20121019154716

Diff

Diff from 1.5 to:

Annotations

Annotate by Age | Author | Mixed | None
/fisheye/browse/pcc/pcc-tests/regress/pcclist/Makefile

Annotated File View

plunky
1.5
1 #       $Id: Makefile,v 1.5 2012/10/19 15:47:16 plunky Exp $
faceless
1.1
2 #
3 # Makefile for pcc regression tests.
4 #
5
6 CC=pcc
7 CFLAGS= 
8 LDFLAGS=
9 LOG=pcclist.log
10
faceless
1.3
11 REGRESS_TARGETS = basic001 basic003 basic004 \
faceless
1.1
12                                                 fields001 fields002 \
faceless
1.2
13                                                 func003 func004 func005 \
14                                                 init001 init003 init004 init005 \
faceless
1.1
15                                                 init006 init007 init008 \
16                                                 prep001 \
17                                                 scope001 \
18                                                 strings001 strings002 \
faceless
1.3
19                                                 types001 types002 \
20                                                 extension001 
faceless
1.1
21
faceless
1.3
22 REGRESS_TARGETS_FAIL = init999 init998 init997 
faceless
1.1
23
24 test:  
25         @echo " Running tests from pcc-list: "  
26         @for TARGET in ${REGRESS_TARGETS} ;\
27         do \
28                 printf  "   %-20s \t\t " "$$TARGET" ;\
ragge
1.4
29                 ${CC} ${CFLAGS} -o $$TARGET.out $$TARGET.c 2>/dev/null 1>&2 && \
faceless
1.1
30                         ./$$TARGET.out >/dev/null && \
31                         echo "passed" || echo "failed" ;\
32         done 
33         @for TARGET2 in ${REGRESS_TARGETS_FAIL} ;\
34         do \
35                 printf  "   %-20s \t\t " "$$TARGET2" ;\
ragge
1.4
36                 ${CC} ${CFLAGS} -o $$TARGET2.out $$TARGET2.c 2>/dev/null 1>&2 && \
faceless
1.1
37                         echo "failed" || echo "passed" ;\
38         done 
faceless
1.2
39         @printf  "   %-20s \t\t " "basic002" ;
40         @${CC} ${CFLAGS} -fpic -O -S -o basic002.out basic002.c 2>/dev/null && \
41                 echo "passed" || echo "failed" ;
42         @printf  "   %-20s \t\t " "func001" ;
43         @${CC} ${CFLAGS} -Wc,-xtemps,-xinline -o func001.out func001.c 2>/dev/null && \
44                 echo "passed" || echo "failed" ;
45         @printf  "   %-20s \t\t " "func002" ;
plunky
1.5
46         @${CC} ${CFLAGS} -Wl,--fatal-warnings -o func002.out func002.c 2>/dev/null && \
faceless
1.2
47                 echo "passed" || echo "failed" ;
48         @printf  "   %-20s \t\t " "init002" ;
49         @${CC} ${CFLAGS} -fPIC -fstack-protector -o init002.out init002.c 2>/dev/null && \
50                 echo "passed" || echo "failed" ;
faceless
1.1
51
52
53 page:
54         @printf  "<h2> pcc-list tests </h2> \n" > ${LOG}
55         @printf  "<table width="300"> \n<tr><th>Test</th><th>Result</th></tr> \n" >> ${LOG}
56         @for TARGET in ${REGRESS_TARGETS} ;\
57         do \
58                 printf  "<tr><td bgcolor=\"#dcdcdc\"> %s </td>" " $$TARGET " >> ${LOG} ;\
59                 ${CC} ${CFLAGS} -o $$TARGET.out $$TARGET.c 2>/dev/null && \
60                         ./$$TARGET.out >/dev/null && \
61                         printf "<td align=\"center\" bgcolor=\"green\" > %s </td></tr>\n" "passed" >> ${LOG} || \
62                         printf "<td align=\"center\" bgcolor=\"red\" > %s </td></tr>\n" "failed" >> ${LOG} ;\
63         done
64         @for TARGET2 in ${REGRESS_TARGETS_FAIL} ;\
65         do \
66                 printf  "<tr><td bgcolor=\"#dcdcdc\"> %s </td>" "$$TARGET2" >> ${LOG} ;\
67                 ${CC} ${CFLAGS} -o $$TARGET2.out $$TARGET2.c 2>/dev/null && \
68                         printf "<td align=\"center\" bgcolor=\"red\" > %s </td></tr>\n" "failed" >> ${LOG} || \
69                         printf "<td align=\"center\" bgcolor=\"green\"> %s </td></tr>\n" "passed" >> ${LOG}  ;\
70         done
faceless
1.2
71         @printf  "<tr><td bgcolor=\"#dcdcdc\"> %s </td>" " basic002 " >> ${LOG} ;
72         @${CC} ${CFLAGS} -fpic -O -S -o basic002.out basic002.c 2>/dev/null && \
73                 printf "<td align=\"center\" bgcolor=\"green\" > %s </td></tr>\n" "passed" >> ${LOG} || \
74                 printf "<td align=\"center\" bgcolor=\"red\" > %s </td></tr>\n" "failed" >> ${LOG} ;
75         @printf  "<tr><td bgcolor=\"#dcdcdc\"> %s </td>" " func001 " >> ${LOG} ;
76         @${CC} ${CFLAGS} -Wc,-xtemps,-xinline -o func001.out func001.c 2>/dev/null && \
77                 printf "<td align=\"center\" bgcolor=\"green\" > %s </td></tr>\n" "passed" >> ${LOG} || \
78                 printf "<td align=\"center\" bgcolor=\"red\" > %s </td></tr>\n" "failed" >> ${LOG} ;
79         @printf  "<tr><td bgcolor=\"#dcdcdc\"> %s </td>" " func002 " >> ${LOG} ;
plunky
1.5
80         @${CC} ${CFLAGS} -Wl,--fatal-warnings -o func002.out func002.c 2>/dev/null && \
faceless
1.2
81                 printf "<td align=\"center\" bgcolor=\"green\" > %s </td></tr>\n" "passed" >> ${LOG} || \
82                 printf "<td align=\"center\" bgcolor=\"red\" > %s </td></tr>\n" "failed" >> ${LOG} ;
83         @printf  "<tr><td bgcolor=\"#dcdcdc\"> %s </td>" " init002 " >> ${LOG} ;
84         @${CC} ${CFLAGS} -fPIC -fstack-protector -o init002.out init002.c 2>/dev/null && \
85                 printf "<td align=\"center\" bgcolor=\"green\" > %s </td></tr>\n" "passed" >> ${LOG} || \
86                 printf "<td align=\"center\" bgcolor=\"red\" > %s </td></tr>\n" "failed" >> ${LOG} ;
faceless
1.1
87         @printf "</table>\n" >> ${LOG}
88
89
90
91 clean:
92         /bin/rm -rf *.out 
93         /bin/rm -rf *.core
94         /bin/rm -rf ${LOG}
95
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-20 12:46 +0200