-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_examples_slow
More file actions
executable file
·31 lines (30 loc) · 1.9 KB
/
Copy pathgenerate_examples_slow
File metadata and controls
executable file
·31 lines (30 loc) · 1.9 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
#!/usr/bin/env bash
#
# Regenerate ALL example output files in examples/ — the quick set ./generate_examples
# covers plus every Usage line of the slow scripts listed in lib/slow_scripts (the gated
# scripts, find_dependencies_minimal_*, the test suites, run_php_unit_tests,
# find_flaky_selenium_tests). Unlike ./test_integration_slow (which runs only what
# ./test_integration doesn't), this is a SUPERSET of the quick run: examples/ is meant to
# be regenerated as one consistent set with one command.
# WARNING: This will take a long time to run (many hours serially; about a day with PARALLEL=N).
# WARNING: This script inhibits sleep (via the exec'd generate_examples) to prevent the machine from suspending.
#
# Usage: ./generate_examples_slow
# PREVIEW=1 ./generate_examples_slow
# DRY_RUN=1 ./generate_examples_slow
# PARALLEL=N ./generate_examples_slow
# PARALLEL=N DRY_RUN=1 ./generate_examples_slow
#
# PREVIEW, DRY_RUN, and PARALLEL behave exactly as in ./generate_examples (see its header
# or README.md) — like every other inherited variable (TIME_ELAPSED, TIME_UTC, ...), they
# reach the exec'd engine via the environment.
#
set -euo pipefail # exit on error, undefined vars, or pipe failures (guards the dirname substitution below)
# The whole implementation is one line: export the internal flag that disables the engine's
# quick-mode slow-line filter, then replace this process with the engine. The assignment
# prefix on exec (a POSIX special builtin) is passed into the exec'd process's environment.
# exec keeps the PID, so the engine's inhibit_sleep helper and EXIT traps behave exactly as
# in a direct run — which is also why this wrapper sources no libs of its own: nothing after
# exec ever runs. "$@" forwards any arguments verbatim (the engine takes none; forwarding
# keeps the two commands interchangeable).
_QUIBBLE_EXAMPLES_ALL=1 exec "$(dirname "$0")"/generate_examples "$@"