Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
  • Loading branch information
mc36 committed Jan 8, 2025
1 parent 5e0e44d commit f9d7d05
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 61 deletions.
37 changes: 0 additions & 37 deletions src/org/freertr/user/userFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -284,43 +284,6 @@ public static List<String> section2text(List<userFilter> src, boolean rep) {
return txt;
}

/**
* convert sections to text
*
* @param sec section to convert
* @param sep format to use
* @return sectioned text
*/
public static List<String> sectionDump(List<userFilter> sec, userFormat.tableMode sep) {
List<String> txt = new ArrayList<String>();
for (int i = 0; i < sec.size(); i++) {
userFilter ntry = sec.get(i);
switch (sep) {
case normal:
txt.add(ntry.section + "|" + ntry.command + "|");
break;
case csv:
txt.add(ntry.section + ";" + ntry.command);
break;
case html:
txt.add("<tr><td>" + ntry.section + "</td><td>" + ntry.command + "</td></tr>");
break;
case setdel:
String a = ntry.command.trim();
String s = "set";
if (a.startsWith(cmds.negated + cmds.tabulator)) {
s = "delete";
a = a.substring(3, a.length());
}
txt.add(s + " " + (ntry.section + " " + a).trim());
break;
default:
break;
}
}
return txt;
}

/**
* negate section
*
Expand Down
9 changes: 0 additions & 9 deletions src/org/freertr/user/userFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ public enum tableMode {
* html mode
*/
html,
/**
* set/delete mode
*/
setdel

}

Expand All @@ -68,8 +64,6 @@ public static String tabmod2str(tableMode mod) {
return "csv";
case html:
return "html";
case setdel:
return "setdel";
default:
return "unknown";
}
Expand Down Expand Up @@ -100,9 +94,6 @@ public static tableMode str2tabmod(String a) {
if (a.equals("html")) {
return tableMode.html;
}
if (a.equals("setdel")) {
return tableMode.setdel;
}
return null;
}

Expand Down
54 changes: 43 additions & 11 deletions src/org/freertr/user/userReader.java
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,6 @@ private cmds doSummary(userFormat.tableMode tabMod, String a) {
break;
case html:
case normal:
case setdel:
break;
}
return new cmds("row", a);
Expand Down Expand Up @@ -848,15 +847,6 @@ public List<String> doFilterList(List<String> lst) {
userEditor edtr = new userEditor(new userScreen(pipe), lst, "result", false);
edtr.doView();
return new ArrayList<String>();
case level:
lst = userFilter.sectionDump(userFilter.text2section(lst), userFormat.tableMode.normal);
return doSecond(lst);
case csv:
lst = userFilter.sectionDump(userFilter.text2section(lst), userFormat.tableMode.csv);
return doSecond(lst);
case html:
lst = userFilter.sectionDump(userFilter.text2section(lst), userFormat.tableMode.html);
return doSecond(lst);
case xml:
encXml xml = new encXml();
userFilter.section2xml(xml, "/config", userFilter.text2section(lst));
Expand All @@ -871,8 +861,50 @@ public List<String> doFilterList(List<String> lst) {
case section:
lst = userFilter.getSection(lst, filterS);
return doSecond(lst);
case level:
List<userFilter> sec = userFilter.text2section(lst);
lst = new ArrayList<String>();
for (int i = 0; i < sec.size(); i++) {
userFilter ntry = sec.get(i);
lst.add(ntry.section + "|" + ntry.command + "|");
}
return doSecond(lst);
case csv:
sec = userFilter.text2section(lst);
lst = new ArrayList<String>();
for (int i = 0; i < sec.size(); i++) {
userFilter ntry = sec.get(i);
lst.add(ntry.section + ";" + ntry.command);
}
return doSecond(lst);
case html:
sec = userFilter.text2section(lst);
lst = new ArrayList<String>();
for (int i = 0; i < sec.size(); i++) {
userFilter ntry = sec.get(i);
lst.add("<tr><td>" + ntry.section + "</td><td>" + ntry.command + "</td></tr>");
}
return doSecond(lst);
case setdel:
lst = userFilter.sectionDump(userFilter.text2section(lst), userFormat.tableMode.setdel);
sec = userFilter.text2section(lst);
lst = new ArrayList<String>();
for (int i = 0; i < sec.size(); i++) {
userFilter ntry = sec.get(i);
a = ntry.command.trim();
if (a.equals(cmds.finish)) {
continue;
}
if (a.equals(cmds.comment)) {
lst.add(cmds.comment);
continue;
}
String s = "set";
if (a.startsWith(cmds.negated + cmds.tabulator)) {
s = "delete";
a = a.substring(3, a.length());
}
lst.add(s + " " + (ntry.section + " " + a).trim());
}
return doSecond(lst);
default:
return doSecond(lst);
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.1.8-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-01-08 07:21:28, took 00:14:39, with 50 workers, on 3604 cases, 0 failed, 0 traces, 0 retries
-;-;-;2025-01-08 07:56:57, took 00:15:10, with 50 workers, on 3604 cases, 0 failed, 0 traces, 1 retries
-;-;-;./rtr.bin
http://sources.freertr.org/cfg/basic01.tst;basic01.tst;success;dummy test
http://sources.freertr.org/cfg/basic02.tst;basic02.tst;success;interface with slot
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.1.8-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-01-08 07:21:28, took 00:14:39, with 50 workers, on 3604 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2025-01-08 07:56:57, took 00:15:10, with 50 workers, on 3604 cases, 0 failed, 0 traces, 1 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v25.1.8-cur, done by sprscc13@mrn0b0dy.
-;-;-;2025-01-08 07:31:36, took 00:09:45, with 50 workers, on 674 cases, 0 failed, 0 traces, 1 retries
-;-;-;2025-01-08 08:08:31, took 00:11:11, with 50 workers, on 674 cases, 0 failed, 0 traces, 0 retries
-;-;-;./rtr.bin
http://sources.freertr.org/cfg/p4lang-acl001.tst;p4lang-acl001.tst;success;p4lang: copp
http://sources.freertr.org/cfg/p4lang-acl002.tst;p4lang-acl002.tst;success;p4lang: ingress access list
Expand Down
2 changes: 1 addition & 1 deletion src/rtr8.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v25.1.8-cur, done by sprscc13@mrn0b0dy.<br/>
tested: 2025-01-08 07:31:36, took 00:09:45, with 50 workers, on 674 cases, 0 failed, 0 traces, 1 retries<br/>
tested: 2025-01-08 08:08:31, took 00:11:11, with 50 workers, on 674 cases, 0 failed, 0 traces, 0 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down

0 comments on commit f9d7d05

Please sign in to comment.