tidied more

This commit is contained in:
2026-10-23 18:43:52 -04:00
parent 3f2f448c03
commit 64cb65760e
3 changed files with 21 additions and 19 deletions
+2 -5
View File
@@ -61,16 +61,13 @@ for DIR in "$GRADER"/tests/*/ ; do
EXPECTED="$(cat "$DIR/status.txt" 2>/dev/null || true)"
case "$EXPECTED" in '' | *[!0-9]*) EXPECTED=0 ;; esac
ARGS="project/args/$NAME"
[ -f "$ARGS" ] || ARGS=/dev/null
if [ -f "$DIR/output.txt" ] ; then
cat "$DIR/output.txt"
elif [ -d canonical ] ; then
(
export PATH=@toolchain@/bin
cd canonical && timeout 2 sh "$DIRECTORY/project/tests/$NAME"
) <"$ARGS" 2>/dev/null || true
) <"project/args/$NAME" 2>/dev/null || true
fi >expected
if cmp -s scratch expected && [ "$EXIT" -eq "$EXPECTED" ] ; then
@@ -135,4 +132,4 @@ curl -s --show-error --out-null --request PUT \
--header "PRIVATE-TOKEN: ${TOKEN:?}" \
--header 'Content-Type: application/json' \
--data "$(jq -n --arg d "$MESSAGE" '{"description": $d}')" \
--url "https://gitlab.com/api/v4/projects/$1/releases/$4"
--url "https://gitlab.com/api/v4/projects/$1/releases/$(jq -rn --arg t "$4" '$t|@uri')"