Index: trunk/tests/drc_query/Makefile =================================================================== --- trunk/tests/drc_query/Makefile (revision 31887) +++ trunk/tests/drc_query/Makefile (revision 31888) @@ -2,6 +2,7 @@ SRC=$(ROOT)/src TDIR=../tests/drc_query +FLT=$(TDIR)/drc_filter.sh PCBRND=./pcb-rnd GLOBARGS=-c rc/library_search_paths=../tests/RTT/lib -c rc/quiet=1 @@ -17,37 +18,37 @@ @diff -u thickness.ref thickness.out && rm thickness.out thickness.out: FORCE - @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/thickness.lht --gui batch > $(TDIR)/thickness.out + @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/thickness.lht --gui batch | $(FLT) > $(TDIR)/thickness.out overlap.diff: overlap.out @diff -u overlap.ref overlap.out && rm overlap.out overlap.out: FORCE - @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/overlap.lht --gui batch > $(TDIR)/overlap.out + @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/overlap.lht --gui batch | $(FLT) > $(TDIR)/overlap.out netint.diff: netint.out @diff -u netint.ref netint.out && rm netint.out netint.out: FORCE - @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/netint.lht --gui batch > $(TDIR)/netint.out + @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/netint.lht --gui batch | $(FLT) > $(TDIR)/netint.out dwg_area.diff: dwg_area.out @diff -u dwg_area.ref dwg_area.out && rm dwg_area.out dwg_area.out: FORCE - @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/dwg_area.lht --gui batch > $(TDIR)/dwg_area.out + @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/dwg_area.lht --gui batch | $(FLT) > $(TDIR)/dwg_area.out fullpoly.diff: fullpoly.out @diff -u fullpoly.ref fullpoly.out && rm fullpoly.out fullpoly.out: FORCE - @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/fullpoly.lht --gui batch > $(TDIR)/fullpoly.out + @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/fullpoly.lht --gui batch | $(FLT) > $(TDIR)/fullpoly.out zone_clr.diff: zone_clr.out @diff -u zone_clr.ref zone_clr.out && rm zone_clr.out zone_clr.out: FORCE - @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/zone_clr.lht --gui batch > $(TDIR)/zone_clr.out + @cd $(SRC) && echo "drc()" | $(PCBRND) $(GLOBARGS) $(TDIR)/zone_clr.lht --gui batch | $(FLT) > $(TDIR)/zone_clr.out clean: @echo "a" > dummy.out Index: trunk/tests/drc_query/drc_filter.sh =================================================================== --- trunk/tests/drc_query/drc_filter.sh (nonexistent) +++ trunk/tests/drc_query/drc_filter.sh (revision 31888) @@ -0,0 +1,88 @@ +#!/bin/sh + +# make drc output comparable (remove dependency on order of reports) + +awk ' + +BEGIN { + shift = 10000 + tn = 0; +} + +function append(line) +{ + if (text == "") + text = line + else + text = text "\n" line +} + +function fin() +{ + if (text != "") { + TEXT[tn] = text; + HASH[tn] = hash+1; + tn++; + text = ""; + hash = 0; + } +} + +function print_best( n,best,bestn) +{ + best = 0 + for(n = 0; n < tn; n++) { + if (TEXT[n] == "") + continue; + if (HASH[n] > best) { + best = HASH[n] + bestn = n + } + } + + if (bestn == "") + return 0; + + print TEXT[bestn] + TEXT[bestn] = "" + return 1; +} + +function print_all() +{ + while(print_best()); +} + +#1: object beyond drawing area: Objects located outside of the drawing area +/^[0-9]+:/ { + line=$0; + sub("^[0-9]+:", "x:", line); + if (!(line in ID)) { + ids++; + ID[line] = ids; + } + hash = ID[line] * shift * shift; + append(line); + next +} + +#within (112.40, -106.35, 237.60, -43.65) mil +/^within/ { + line=$0; + sub(".*[(]", "", line); + split(line, C, "[,]"); + + hash += C[1] * shift + C[2] +} + +{ append($0); } + +/^$/ { fin() } + +END { + fin(); + print_all(); +} + + +' Property changes on: trunk/tests/drc_query/drc_filter.sh ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Index: trunk/tests/drc_query/dwg_area.ref =================================================================== --- trunk/tests/drc_query/dwg_area.ref (revision 31887) +++ trunk/tests/drc_query/dwg_area.ref (revision 31888) @@ -1,20 +1,20 @@ -1: object beyond drawing area: Objects located outside of the drawing area -within (112.40, -106.35, 237.60, -43.65) mil +x: object beyond drawing area: Objects located outside of the drawing area +within (487.40, 43.65, 612.60, 106.35) mil required value 0.00 Objects may be omitted from exports or may be outside of the board contour. -2: object beyond drawing area: Objects located outside of the drawing area -within (-212.60, 43.65, -87.40, 106.35) mil +x: object beyond drawing area: Objects located outside of the drawing area +within (112.40, 193.65, 237.60, 256.35) mil required value 0.00 Objects may be omitted from exports or may be outside of the board contour. -3: object beyond drawing area: Objects located outside of the drawing area -within (112.40, 193.65, 237.60, 256.35) mil +x: object beyond drawing area: Objects located outside of the drawing area +within (112.40, -106.35, 237.60, -43.65) mil required value 0.00 Objects may be omitted from exports or may be outside of the board contour. -4: object beyond drawing area: Objects located outside of the drawing area -within (487.40, 43.65, 612.60, 106.35) mil +x: object beyond drawing area: Objects located outside of the drawing area +within (-212.60, 43.65, -87.40, 106.35) mil required value 0.00 Objects may be omitted from exports or may be outside of the board contour. Index: trunk/tests/drc_query/fullpoly.ref =================================================================== --- trunk/tests/drc_query/fullpoly.ref (revision 31887) +++ trunk/tests/drc_query/fullpoly.ref (revision 31888) @@ -1,6 +1,6 @@ W: Polygon #111 cleared out of existence near (2.2225 mm, 8.5725 mm) W: Polygon #116 cleared out of existence near (8.5725 mm, 8.5725 mm) -1: fullpoly: Multi-island polygon with the fullpoly flag +x: fullpoly: Multi-island polygon with the fullpoly flag within (259.38, 9.38, 415.63, 165.63) mil required value 0.00 Polygon with the fullpoly flag set is cut into multiple islands Index: trunk/tests/drc_query/netint.ref =================================================================== --- trunk/tests/drc_query/netint.ref (revision 31887) +++ trunk/tests/drc_query/netint.ref (revision 31888) @@ -1,15 +1,15 @@ -1: broken net: insufficient overlap -within (18.65, 113.55, 81.35, 227.25) mil -required value 0.00 -the overlap between two objects in the net is insufficient and can lead to broken network during board fabrication - -2: shorted nets: net too close to other net +x: shorted nets: net too close to other net within (36.40, 86.95, 124.64, 149.65) mil required value 0.00 insufficient clearance between an object of the network and objects of other networks -3: shorted nets: net too close to other net +x: shorted nets: net too close to other net within (27.91, 7.31, 90.61, 183.43) mil required value 0.00 insufficient clearance between an object of the network and objects of other networks +x: broken net: insufficient overlap +within (18.65, 113.55, 81.35, 227.25) mil +required value 0.00 +the overlap between two objects in the net is insufficient and can lead to broken network during board fabrication + Index: trunk/tests/drc_query/overlap.ref =================================================================== --- trunk/tests/drc_query/overlap.ref (revision 31887) +++ trunk/tests/drc_query/overlap.ref (revision 31888) @@ -1,11 +1,11 @@ -1: single hole: hole too small -within (20.00, 245.00, 130.00, 355.00) mil -required value 0.00 -padstack hole diameter is too small - -2: pair hole: overlapping holes +x: pair hole: overlapping holes within (20.00, 145.00, 130.00, 255.00) mil required value 31.50 mil measured value 25.00 mil padstack holes overlap +x: single hole: hole too small +within (20.00, 245.00, 130.00, 355.00) mil +required value 0.00 +padstack hole diameter is too small + Index: trunk/tests/drc_query/thickness.ref =================================================================== --- trunk/tests/drc_query/thickness.ref (revision 31887) +++ trunk/tests/drc_query/thickness.ref (revision 31888) @@ -1,30 +1,30 @@ -1: thin copper: copper object too thin -within (44.28, 322.41, 105.72, 602.59) mil +x: thin silk: silk object too thin +within (1196.00, 413.75, 1566.00, 556.25) mil required value 0.00 -Copper object thickness is below the required value. Copper objects too thin may break or peel off during board fabriaction. +Silk object thickness is below the required value. Silk objects too thin may disappear during board fabrication. -2: thin copper: copper object too thin -within (125.01, 350.01, 374.99, 599.99) mil +x: thin silk: silk object too thin +within (976.92, 351.93, 1223.08, 598.08) mil required value 0.00 -Copper object thickness is below the required value. Copper objects too thin may break or peel off during board fabriaction. +Silk object thickness is below the required value. Silk objects too thin may disappear during board fabrication. -3: thin copper: copper object too thin +x: thin silk: silk object too thin +within (896.16, 324.29, 953.84, 600.71) mil +required value 0.00 +Silk object thickness is below the required value. Silk objects too thin may disappear during board fabrication. + +x: thin copper: copper object too thin within (346.00, 413.75, 716.00, 556.25) mil required value 0.00 Copper object thickness is below the required value. Copper objects too thin may break or peel off during board fabriaction. -4: thin silk: silk object too thin -within (896.16, 324.29, 953.84, 600.71) mil +x: thin copper: copper object too thin +within (125.01, 350.01, 374.99, 599.99) mil required value 0.00 -Silk object thickness is below the required value. Silk objects too thin may disappear during board fabrication. +Copper object thickness is below the required value. Copper objects too thin may break or peel off during board fabriaction. -5: thin silk: silk object too thin -within (976.92, 351.93, 1223.08, 598.08) mil +x: thin copper: copper object too thin +within (44.28, 322.41, 105.72, 602.59) mil required value 0.00 -Silk object thickness is below the required value. Silk objects too thin may disappear during board fabrication. +Copper object thickness is below the required value. Copper objects too thin may break or peel off during board fabriaction. -6: thin silk: silk object too thin -within (1196.00, 413.75, 1566.00, 556.25) mil -required value 0.00 -Silk object thickness is below the required value. Silk objects too thin may disappear during board fabrication. - Index: trunk/tests/drc_query/zone_clr.ref =================================================================== --- trunk/tests/drc_query/zone_clr.ref (revision 31887) +++ trunk/tests/drc_query/zone_clr.ref (revision 31888) @@ -1,10 +1,10 @@ -1: shorted nets: net too close to other net (zone) -within (362.40, 293.65, 487.60, 356.35) mil +x: shorted nets: net too close to other net (zone) +within (396.78, 168.65, 678.22, 231.35) mil required value 20.00 mil insufficient clearance between an object of the network and objects of other networks -2: shorted nets: net too close to other net (zone) -within (396.78, 168.65, 678.22, 231.35) mil +x: shorted nets: net too close to other net (zone) +within (362.40, 293.65, 487.60, 356.35) mil required value 20.00 mil insufficient clearance between an object of the network and objects of other networks