diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ChangeLog | 10 | ||||
-rw-r--r-- | test/Makefile.am | 4 | ||||
-rw-r--r-- | test/Makefile.in | 4 | ||||
-rw-r--r-- | test/profile2.ok | 4 | ||||
-rw-r--r-- | test/xref.awk | 3 |
5 files changed, 18 insertions, 7 deletions
diff --git a/test/ChangeLog b/test/ChangeLog index b0593353..6ef33984 100644 --- a/test/ChangeLog +++ b/test/ChangeLog @@ -1,3 +1,13 @@ +Mon Feb 14 21:31:10 2011 Arnold D. Robbins <arnold@skeeve.com> + + * Makefile.am (profile2): Add -v sortcmd=sort to pgawk invocation. + (profile1): Remove awkprof.out. Thanks to Pat Rankin for noticing. + +Sun Feb 13 20:27:35 2011 Pat Rankin <rankin@pactechdata.com> + + * xref.awk: Allow sortcmd to be preset via -v option. + * profile2.ok: Sync with updated xref.awk. + Sun Feb 13 19:55:15 2011 Arnold D. Robbins <arnold@skeeve.com> * Makefile.am (profile3): New test. diff --git a/test/Makefile.am b/test/Makefile.am index 65082f7f..92372197 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1315,12 +1315,12 @@ dumpvars:: profile1: @echo $@ @$(AWK) --profile -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > _$@.out1 - @$(AWK) -f awkprof.out $(srcdir)/dtdgport.awk > _$@.out2 + @$(AWK) -f awkprof.out $(srcdir)/dtdgport.awk > _$@.out2 ; rm awkprof.out @cmp _$@.out1 _$@.out2 && rm _$@.out[12] || echo EXIT CODE: $$? >>_$@ profile2: @echo $@ - @$(PGAWK) -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null + @$(PGAWK) -v sortcmd=sort -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null @sed 1,2d < awkprof.out > _$@; rm awkprof.out @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ diff --git a/test/Makefile.in b/test/Makefile.in index f5ec9b1a..37c50e0e 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -1663,12 +1663,12 @@ dumpvars:: profile1: @echo $@ @$(AWK) --profile -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > _$@.out1 - @$(AWK) -f awkprof.out $(srcdir)/dtdgport.awk > _$@.out2 + @$(AWK) -f awkprof.out $(srcdir)/dtdgport.awk > _$@.out2 ; rm awkprof.out @cmp _$@.out1 _$@.out2 && rm _$@.out[12] || echo EXIT CODE: $$? >>_$@ profile2: @echo $@ - @$(PGAWK) -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null + @$(PGAWK) -v sortcmd=sort -f $(srcdir)/xref.awk $(srcdir)/dtdgport.awk > /dev/null @sed 1,2d < awkprof.out > _$@; rm awkprof.out @-$(CMP) $(srcdir)/$@.ok _$@ && rm -f _$@ diff --git a/test/profile2.ok b/test/profile2.ok index 793ee32f..fe76a2c9 100644 --- a/test/profile2.ok +++ b/test/profile2.ok @@ -1,6 +1,9 @@ # BEGIN block(s) BEGIN { + 1 if (sortcmd == "") { + sortcmd = "sort" + } 1 asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" "do:else:exit:exp:for:getline:gsub:if:in:index:int:" "length:log:match:next:print:printf:rand:return:sin:" "split:sprintf:sqrt:srand:sub:substr:system:while", keywords, ":") 1 split("00:00:00:00:00:00:00:00:00:00:" "20:10:10:12:12:11:07:00:00:00:" "08:08:08:08:08:33:08:00:00:00:" "08:44:08:36:08:08:08:00:00:00:" "08:44:45:42:42:41:08", machine, ":") 1 state = 1 @@ -68,7 +71,6 @@ } 570 state = nextstate } - 1 sortcmd = "sort" 47 for (i = 1; i <= nnames; i++) { 47 printf("%d ", xnames[names[i]]) | sortcmd 47 if (index(names[i], "(") == 0) { # 3 diff --git a/test/xref.awk b/test/xref.awk index 94d587f8..d23a0c8d 100644 --- a/test/xref.awk +++ b/test/xref.awk @@ -4,6 +4,7 @@ # for the sort command and to use `sort -k1' instead of `sort +1' BEGIN { + if (sortcmd == "") sortcmd = "sort" # "sort -k1" # create array of keywords to be ignored by lexer asplit("BEGIN:END:atan2:break:close:continue:cos:delete:" \ @@ -76,8 +77,6 @@ state = nextstate } # finished parsing, now ready to print output - #sortcmd = "sort -k1" - sortcmd = "sort" for ( i = 1; i <= nnames; i++ ) { printf "%d ", xnames[names[i]] | sortcmd if ( index(names[i],"(") == 0 ) |