#!/bin/bash # Test of the masks of q3_check (IIS-Q-0003), in the clean environment. # The mode "masks" reads the puncture classes from the arguments 5, 6 and 7. The argument 4 is # a placeholder. Example: "q3_check masks 0 p1s - 0" prints the masks for one punctured class 0. # usage (from the root of the workspace): /bin/bash -c '. work/lean_env.sh && bash work/capset/q0003/run_masks_test.sh' W=$(cd "$(dirname "$0")/../../.." && pwd) # the root of the workspace; this script is in work/capset/q0003 D=$W/work/capset/q0003 Q=$D/q3_check L=$D/logs PY3=/opt/homebrew/bin/python3 for KIND in intact dual; do "$Q" masks 0 "$KIND" > "$L/q3_masks_$KIND.txt" 2>&1 done "$Q" masks 0 p1s - 0 > "$L/q3_masks_p1s0.txt" 2>&1 "$Q" masks 0 p1s - 1 > "$L/q3_masks_p1s1.txt" 2>&1 "$Q" masks 0 p1w - 0 > "$L/q3_masks_p1w0.txt" 2>&1 "$Q" masks 0 p2 - 0 1 > "$L/q3_masks_p2.txt" 2>&1 { echo "start $(date -u +%Y-%m-%dT%H:%M:%SZ)" echo "binary sha256 $(shasum -a 256 "$Q" | cut -d' ' -f1)" echo "summary script sha256 $(shasum -a 256 "$D/q3_masks_summary.py" | cut -d' ' -f1)" "$PY3" -I "$D/q3_masks_summary.py" "$L" echo "exit code $?" echo "end $(date -u +%Y-%m-%dT%H:%M:%SZ)" } > "$L/q3_masks_test.log" 2>&1