-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun-integration.sh
More file actions
executable file
·52 lines (45 loc) · 1.96 KB
/
Copy pathrun-integration.sh
File metadata and controls
executable file
·52 lines (45 loc) · 1.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#!/usr/bin/env bash
# Copyright 2026 Query Farm LLC - https://query.farm
#
# Run this repo's sqllogictest suite (test/sql/*.test) against the easter VGI
# worker, using a prebuilt standalone `haybarn-unittest` and the signed
# community `vgi` extension — no C++ build from source. See ci/README.md.
#
# Required environment:
# HAYBARN_UNITTEST path to the haybarn-unittest binary
# VGI_EASTER_WORKER worker LOCATION the .test files attach (a stdio command
# such as the installed `vgi-easter`, or an http:// URL)
# Optional:
# STAGE scratch dir for the preprocessed test tree (default: mktemp)
set -euo pipefail
: "${HAYBARN_UNITTEST:?path to the haybarn-unittest binary}"
: "${VGI_EASTER_WORKER:?worker LOCATION (stdio command or http:// URL)}"
HERE="$(cd "$(dirname "$0")" && pwd)"
REPO="$(cd "$HERE/.." && pwd)"
STAGE="${STAGE:-$(mktemp -d)}"
echo "Staging preprocessed tests into $STAGE ..."
mkdir -p "$STAGE/test/sql"
for f in "$REPO"/test/sql/*.test; do
awk -f "$HERE/preprocess-require.awk" "$f" > "$STAGE/test/sql/$(basename "$f")"
done
cd "$STAGE"
# Warm the extension cache once: vgi from the signed community channel, the rest
# from signed core. A miss here is only a warning — the per-test INSTALL/LOAD
# (injected by preprocess-require.awk) is what actually gates each file.
echo "Warming the extension cache (vgi from community, httpfs from core) ..."
mkdir -p "$STAGE/test"
cat > "$STAGE/test/_warm.test" <<'EOF'
# name: test/_warm.test
# group: [warm]
statement ok
INSTALL vgi FROM community;
statement ok
INSTALL httpfs FROM core;
EOF
"$HAYBARN_UNITTEST" "test/_warm.test" >/dev/null 2>&1 || echo "::warning::extension warm step did not fully succeed"
rm -f "$STAGE/test/_warm.test"
# Run the whole suite in one invocation, streaming the runner's native
# sqllogictest report. Any failed assertion exits non-zero and fails the job
# (via `set -e`).
echo "Running suite (worker: $VGI_EASTER_WORKER) ..."
"$HAYBARN_UNITTEST" "test/sql/*"