mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-11 22:49:54 +00:00
* Auto detect fixture usage in tests * Changes to runner for enabling e e2e tests * Only detect fixtures in test/UI/debug modes * Make scanning more resilient - require test.use, allow for multiple lines * Fix e2e/runner CI generate check * Make scanning context aware to match with running individual tests * Log enabled fixtures on one line * Rename gen-fixtures, move go gen to main.go * Return an error if no tests are matched * gen-ts-fixtures: Use text/template instead of manually writing to buf * Ignore generated fixtures.ts instead of formatting it * Fix pnpm lockfile patching for when e/e2e is missing * Simplify test running mode detection for scanning fixtures * go generate * Remove codegen from test run logic * Handle run.sh receiving e/e2e directly * Allow for fixtures to be enabled manually through flags * Fix logging of enabled fixtures to include the ones set by flags * Handle inline comments * Update cmd in generated file * Only pnpm install if teleport/connect needs building * Error if UI mode is invoked with connect tests * Handle errors better when checking if a binary exists * Add info to the README about manually enabling fixtures * Debug -> Warn * Add test files to --ui * Handle comments in strings properly * Remove connect TSH from pnpm install logic * Ignore flags in run.sh * Handle double quotes just in case * Add line number back * Handle commented out imports * Always include host.docker.internal in the certs * Only scan fixtures in test mode/when test files are specified * Make e2e/run.sh work with absolute paths to e/ tests * Scan fixtures when running tests but not in UI mode --------- Co-authored-by: Maja Cieślak <[email protected]>
26 lines
930 B
Bash
Executable File
26 lines
930 B
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# Builds teleport, tctl, and tsh (with webauthnmock) in parallel for e2e tests.
|
|
# Build logs are written to build-logs/.
|
|
#
|
|
|
|
set -eo pipefail
|
|
|
|
MAKE="${MAKE:-make}"
|
|
BUILDDIR="${BUILDDIR:-build}"
|
|
TSH_SOURCE="${TSH_SOURCE:-./tool/tsh}"
|
|
|
|
cargo --version && rustc --version && echo "ARCH=$(uname -m)"
|
|
|
|
mkdir -p build-logs
|
|
|
|
${MAKE} "${BUILDDIR}/teleport" 2>&1 | tee build-logs/teleport.log & pid_teleport=$!
|
|
${MAKE} "${BUILDDIR}/tctl" 2>&1 | tee build-logs/tctl.log & pid_tctl=$!
|
|
go build -tags webauthnmock -o "${BUILDDIR}/tsh-e2e-webauthnmock" "${TSH_SOURCE}" 2>&1 | tee build-logs/tsh.log & pid_tsh=$!
|
|
|
|
failed=0
|
|
wait $pid_teleport || { echo "::error::make ${BUILDDIR}/teleport failed with exit code $?"; failed=1; }
|
|
wait $pid_tctl || { echo "::error::make ${BUILDDIR}/tctl failed with exit code $?"; failed=1; }
|
|
wait $pid_tsh || { echo "::error::go build tsh failed with exit code $?"; failed=1; }
|
|
exit $failed
|