Complete sim config boundary coverage
This commit is contained in:
@@ -22,7 +22,8 @@ while [[ $# -gt 0 ]]; do
|
||||
Usage: $0 [--only PATH_SUBSTRING]
|
||||
|
||||
Runs LinuxCNC configs/sim .ngc programs through LinuxCNC's rs274 standalone
|
||||
entry point and writes logs plus summary.tsv under:
|
||||
entry point and writes logs plus summary.tsv, class-summary.tsv, and
|
||||
path-matrix.tsv under:
|
||||
$BUILD_DIR
|
||||
EOF
|
||||
exit 0
|
||||
@@ -44,6 +45,10 @@ if [[ ! -d "$SIM_DIR" ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p "$BUILD_DIR"
|
||||
exec 9>"$BUILD_DIR/inventory.lock"
|
||||
flock 9
|
||||
|
||||
"$ROOT_DIR/tools/build_native_probes.sh"
|
||||
|
||||
export LD_LIBRARY_PATH="$LINUXCNC_DIR/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
|
||||
@@ -52,6 +57,8 @@ export PYTHONPATH="$LINUXCNC_DIR/lib/python${PYTHONPATH:+:$PYTHONPATH}"
|
||||
mkdir -p "$BUILD_DIR"/{logs,out,wrapped,params}
|
||||
: > "$BUILD_DIR/skipped.tsv"
|
||||
SUMMARY_FILE="$BUILD_DIR/summary.tsv"
|
||||
CLASS_SUMMARY_FILE="$BUILD_DIR/class-summary.tsv"
|
||||
PATH_MATRIX_FILE="$BUILD_DIR/path-matrix.tsv"
|
||||
printf 'path\tclass\tstatus\texpected_failure\texit_code\tseconds\tini\ttbl\toutput_lines\tstderr_summary\n' > "$SUMMARY_FILE"
|
||||
|
||||
relpath() {
|
||||
@@ -392,9 +399,69 @@ while IFS= read -r ngc; do
|
||||
"$stderr_summary" >> "$SUMMARY_FILE"
|
||||
done < <(find "$SIM_DIR" -type f -name '*.ngc' | sort)
|
||||
|
||||
{
|
||||
printf 'class\tstatus\texpected_failure\tcount\n'
|
||||
awk -F '\t' '
|
||||
NR > 1 {
|
||||
class[$2] += 1
|
||||
status[$2 "\t" $3] += 1
|
||||
if ($4 != "") {
|
||||
expected[$2 "\t" $4] += 1
|
||||
}
|
||||
}
|
||||
END {
|
||||
for (key in class) {
|
||||
print key "\tALL\t-\t" class[key]
|
||||
}
|
||||
for (key in status) {
|
||||
split(key, parts, "\t")
|
||||
print parts[1] "\t" parts[2] "\t-\t" status[key]
|
||||
}
|
||||
for (key in expected) {
|
||||
split(key, parts, "\t")
|
||||
print parts[1] "\tEXPECTED_FAIL\t" parts[2] "\t" expected[key]
|
||||
}
|
||||
}
|
||||
' "$SUMMARY_FILE" | sort
|
||||
} > "$CLASS_SUMMARY_FILE"
|
||||
|
||||
awk -F '\t' '
|
||||
BEGIN {
|
||||
OFS = "\t"
|
||||
print "path", "class", "status", "expected_failure", "ini", "tbl", "runtime_family", "blocked"
|
||||
}
|
||||
NR > 1 {
|
||||
runtime_family = $1
|
||||
sub("/[^/]+$", "", runtime_family)
|
||||
blocked = ""
|
||||
if ($1 ~ /^axis\/db_demo\//) {
|
||||
blocked = "L4-TOOL-DB"
|
||||
} else if ($1 ~ /^axis\/vismach\/millturn\// && $2 == "main") {
|
||||
blocked = "L4-USER-M-PROCESS"
|
||||
} else if ($4 == "upstream-demo-missing-motion-gcode") {
|
||||
blocked = "UPSTREAM-DEMO"
|
||||
} else if ($1 ~ /^axis\/remap\// && $2 == "main") {
|
||||
blocked = "L4-PYTHON-REMAP"
|
||||
} else if ($1 ~ /^axis\/vismach\/VMC_toolchange\// && $2 == "main") {
|
||||
blocked = "L4-PYTHON-REMAP"
|
||||
} else if ($1 ~ /^gmoccapy\//) {
|
||||
blocked = "L4-PYTHON-REMAP"
|
||||
} else if ($1 ~ /^axis\/laser\//) {
|
||||
blocked = "L4-PYTHON-REMAP"
|
||||
} else if ($1 ~ /^axis\/vismach\/5axis\/table-rotary_spindle-rotary-nutating\/demos\//) {
|
||||
blocked = "L4-PYTHON-REMAP"
|
||||
} else if ($2 == "remap_subroutine") {
|
||||
blocked = "ASSET-ONLY"
|
||||
}
|
||||
print $1, $2, $3, ($4 == "" ? "-" : $4), $7, $8, runtime_family, (blocked == "" ? "-" : blocked)
|
||||
}
|
||||
' "$SUMMARY_FILE" > "$PATH_MATRIX_FILE"
|
||||
|
||||
{
|
||||
printf 'sim config harness summary\n'
|
||||
printf 'summary: %s\n' "$SUMMARY_FILE"
|
||||
printf 'class_summary: %s\n' "$CLASS_SUMMARY_FILE"
|
||||
printf 'path_matrix: %s\n' "$PATH_MATRIX_FILE"
|
||||
printf 'total: %s\n' "$total"
|
||||
printf 'pass: %s\n' "$pass"
|
||||
printf 'fail: %s\n' "$fail"
|
||||
|
||||
Reference in New Issue
Block a user