Something went wrong. Try again.
xburner is an experimental HTTP and gRPC load generator written in Zig.
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122#!/bin/shset -eu
. "$(dirname "$0")/common.sh"xburner_init
WORKFLOW_WASM="${ROOT_DIR}/samples/workflow-health.wasm"PROFILE=""RUN_CONFIG_LOADER=1RUN_MANUAL_HTTPS=1RUN_SIMPLE_SAMPLE=1RUN_WORKFLOW_SAMPLE=1RUN_GRPC_HARDENING=1RUN_GRPC_SAMPLE=1
usage() { printf 'usage: %s [--profile darwin|linux|generic] [--skip-config-loader] [--skip-manual-https] [--skip-simple-sample] [--skip-workflow-sample] [--skip-grpc-hardening] [--skip-grpc-sample]\n' "$0" >&2 exit 2}
while [ $# -gt 0 ]; do case "$1" in --profile) shift [ $# -gt 0 ] || usage PROFILE=$1 ;; --skip-config-loader) RUN_CONFIG_LOADER=0 ;; --skip-manual-https) RUN_MANUAL_HTTPS=0 ;; --skip-simple-sample) RUN_SIMPLE_SAMPLE=0 ;; --skip-workflow-sample) RUN_WORKFLOW_SAMPLE=0 ;; --skip-grpc-hardening) RUN_GRPC_HARDENING=0 ;; --skip-grpc-sample) RUN_GRPC_SAMPLE=0 ;; --help|-h) usage ;; *) usage ;; esac shiftdone
preflight() { if [ "${SKIP_ZIG_BUILD:-0}" = "1" ] && [ ! -x "${XBURNER_BIN}" ]; then printf >&2 'missing %s; run `zig build -Doptimize=ReleaseFast` or unset SKIP_ZIG_BUILD\n' "${XBURNER_BIN}" exit 1 fi
if [ "${SKIP_WORKFLOW_WASM_BUILD:-0}" = "1" ] && [ ! -f "${WORKFLOW_WASM}" ]; then printf >&2 'missing %s; run `sh scripts/build_workflow_sample_wasm.sh` or unset SKIP_WORKFLOW_WASM_BUILD\n' "${WORKFLOW_WASM}" exit 1 fi}
preflight
if [ -n "${PROFILE}" ]; then OS_NAME=${PROFILE}else OS_NAME=$(uname -s)fi
run_step() { label=$1 shift printf 'release smoke: %s\n' "${label}" "$@"}
xburner_build_if_needed -Doptimize=ReleaseFastxburner_build_workflow_sample_if_needed
run_step scaffold env SKIP_ZIG_BUILD=1 SKIP_WORKFLOW_WASM_BUILD=1 sh "${ROOT_DIR}/scripts/test_workflow_scaffold.sh"if [ "${RUN_CONFIG_LOADER}" -eq 1 ]; then run_step config-loader-suite env SKIP_ZIG_BUILD=1 SKIP_WORKFLOW_WASM_BUILD=1 sh "${ROOT_DIR}/scripts/test_config_loader_suite.sh"fiif [ "${RUN_GRPC_HARDENING}" -eq 1 ]; then run_step grpc-hardening env SKIP_ZIG_BUILD=1 sh "${ROOT_DIR}/scripts/test_grpc_hardening.sh"fiif [ "${RUN_GRPC_SAMPLE}" -eq 1 ]; then run_step grpc-sample env SKIP_ZIG_BUILD=1 sh "${ROOT_DIR}/scripts/test_samples.sh" grpcfi
case "${OS_NAME}" in Darwin|darwin) if [ "${RUN_MANUAL_HTTPS}" -eq 1 ]; then run_step manual-https env SKIP_ZIG_BUILD=1 sh "${ROOT_DIR}/scripts/test_manual_tls_keepalive.sh" fi if [ "${RUN_WORKFLOW_SAMPLE}" -eq 1 ]; then run_step workflow-sample env SKIP_ZIG_BUILD=1 SKIP_WORKFLOW_WASM_BUILD=1 sh "${ROOT_DIR}/scripts/test_samples.sh" workflow fi printf 'release smoke profile: darwin\n' ;; Linux|linux) if [ "${RUN_SIMPLE_SAMPLE}" -eq 1 ]; then run_step simple-sample env SKIP_ZIG_BUILD=1 sh "${ROOT_DIR}/scripts/test_samples.sh" simple fi printf 'release smoke profile: linux\n' ;; generic) printf 'release smoke profile: generic\n' ;; *) printf 'release smoke profile: generic (%s)\n' "${OS_NAME}" ;;esac
printf 'release smoke checks passed\n'