OILS / soil / worker.sh View on Github | oils.pub

705 lines, 214 significant
1#!/usr/bin/env bash
2#
3# Run continuous build tasks.
4#
5# Usage:
6# soil/worker.sh <function name>
7
8set -o nounset
9set -o pipefail
10set -o errexit
11
12REPO_ROOT=$(cd "$(dirname $0)/.."; pwd) # tsv-lib.sh uses this
13readonly REPO_ROOT
14
15source soil/common.sh
16source test/tsv-lib.sh
17
18py-all-and-ninja() {
19 ### baseline for most tasks
20
21 build/py.sh all
22 ./NINJA-config.sh
23}
24
25ninja-config() {
26 ./NINJA-config.sh
27}
28
29dummy-tasks() {
30 ### Print tasks that execute quickly
31
32 # (task_name, script, action, result_html)
33 cat <<EOF
34os-info soil/diagnose.sh os-info -
35dump-env soil/diagnose.sh dump-env -
36EOF
37}
38
39raw-vm-tasks() {
40 # The perf tool depends on a specific version of a kernel, so run it outside
41 # a container.
42
43 # (task_name, script, action, result_html)
44 cat <<EOF
45os-info soil/diagnose.sh os-info -
46dump-env soil/diagnose.sh dump-env -
47perf-install benchmarks/perf.sh soil-install -
48wait-for-tarball soil/wait.sh for-cpp-tarball -
49test-install-tar devtools/release-native.sh test-install-tar -
50perf-profiles benchmarks/perf.sh soil-run _tmp/perf/index.html
51EOF
52}
53
54# Oh there is a large list of pre-installed software
55# https://github.com/actions/runner-images#available-images
56# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2004-Readme.md
57# https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md
58#
59# 1. System deps for building wedges - ninja, cmake, libreadline-dev, etc.
60# 2. fetch wedges - re2c, cmark, python2, python3, MyPy, pyflakes
61# - Python 3.10 desired for "pea"
62# 3. build them
63# 4. build Oils with them
64
65dev-setup-for() {
66 local distro=$1
67 # (task_name, script, action, result_html)
68
69 cat <<EOF
70os-info soil/diagnose.sh os-info -
71dump-env soil/diagnose.sh dump-env -
72wedge-deps build/deps.sh wedge-deps-$distro -
73fetch build/deps.sh fetch -
74install-wedges build/deps.sh install-wedges-soil _build/wedge/logs/index.html
75py-all-and-ninja soil/worker.sh py-all-and-ninja -
76smoke-test build/dev-setup-test.sh smoke-test -
77wedge-report build/deps.sh wedge-report -
78EOF
79}
80
81spec-bin-for() {
82 local distro=$1
83 cat <<EOF
84os-info soil/diagnose.sh os-info -
85dump-env soil/diagnose.sh dump-env -
86wedge-deps build/deps.sh wedge-deps-$distro -
87fetch build/deps.sh fetch -
88spec-bin build/deps.sh install-spec-bin-fast _build/wedge/logs/index.html
89EOF
90}
91
92dev-setup-debian-tasks() {
93 # (task_name, script, action, result_html)
94
95 dev-setup-for debian
96}
97
98dev-setup-fedora-tasks() {
99 # (task_name, script, action, result_html)
100
101 dev-setup-for fedora
102}
103
104dev-setup-alpine-tasks() {
105 # (task_name, script, action, result_html)
106
107 dev-setup-for alpine
108}
109
110pea-tasks() {
111 ### Print tasks for the 'pea' build
112
113 # We need a later version of Python 3 / MyPy both to type check and
114 # to parse
115
116 # Run py-source so we can type check generated code
117 # We need to type check more than we translate
118
119 # (task_name, script, action, result_html)
120 cat <<EOF
121os-info soil/diagnose.sh os-info -
122dump-env soil/diagnose.sh dump-env -
123py-source build/py.sh py-source -
124typecheck pea/TEST.sh check-with-latest-mypy -
125parse-all pea/TEST.sh parse-all -
126EOF
127
128# Moved this to cpp-small, because it depends on py-all-and-ninja
129# run-tests pea/TEST.sh run-tests -
130}
131
132dev-minimal-tasks() {
133 ### Print tasks for the 'dev-minimal' build
134
135 # repo overview is suggested by README.md
136
137 # (task_name, script, action, result_html)
138 cat <<EOF
139os-info soil/diagnose.sh os-info -
140dump-env soil/diagnose.sh dump-env -
141build-minimal build/py.sh minimal -
142repo-overview metrics/source-code.sh overview -
143lint test/lint.sh soil-run -
144asdl-types asdl/TEST.sh check-types -
145oil-types devtools/types.sh soil-run -
146unit test/unit.sh minimal _test/py-unit/
147lossless test/lossless.sh soil-run -
148parse-errors test/parse-errors.sh soil-run-py -
149runtime-errors test/runtime-errors.sh soil-run-py -
150ysh-parse-errors test/ysh-parse-errors.sh soil-run-py -
151ysh-runtime-errors test/ysh-runtime-errors.sh soil-run-py -
152ysh-every-string test/ysh-every-string.sh soil-run-py -
153ysh-large ysh/run.sh soil-run -
154j8-errors data_lang/j8-errors.sh soil-run-py -
155error-catalog doc/error-catalog.sh soil-run-py -
156link-busybox-ash test/spec-bin.sh link-busybox-ash -
157osh-minimal test/spec-py.sh osh-minimal _tmp/spec/osh-minimal/index.html
158headless client/run.sh soil-run-py -
159EOF
160}
161
162interactive-tasks() {
163 ### Print tasks for the 'interactive' build
164
165 # TODO: also run interactive suite with osh-cpp
166
167# TODO: Why does the needs-terminal suite hang in Docker? It doesn't hang in an interactive Docker session.
168#
169# needs-terminal test/spec-py.sh needs-terminal-all _tmp/spec/needs-terminal-py/index.html
170#
171# https://oilshell.zulipchat.com/#narrow/stream/121539-oil-dev/topic/Spec.20Tests.20for.20Interactive.20Parsing
172
173 cat <<EOF
174os-info soil/diagnose.sh os-info -
175dump-env soil/diagnose.sh dump-env -
176py-all-and-ninja soil/worker.sh py-all-and-ninja -
177interactive-osh test/spec-py.sh interactive-osh _tmp/spec/interactive-osh/index.html
178nohup test/nohup.sh soil-run -
179process-table test/process-table.sh soil-run _tmp/process-table/index.html
180stateful test/stateful.sh soil-run _tmp/spec/stateful/index.html
181EOF
182
183}
184
185wild-tasks() {
186 ### Print tasks for the 'wild' build
187
188 # (task_name, script, action, result_html)
189 cat <<EOF
190os-info soil/diagnose.sh os-info -
191dump-env soil/diagnose.sh dump-env -
192wait-for-tarball soil/wait.sh for-cpp-tarball -
193test-tar devtools/release-native.sh test-tar -
194linecount metrics/tarball.sh linecount-oils-cpp -
195wild test/wild.sh soil-run _tmp/wild-www/index.html
196EOF
197}
198
199# TODO:
200# - osh-parser and osh-runtime can build with the tarball, not Ninja?
201# - and then move to benchmarks2 task
202benchmarks-tasks() {
203 # (task_name, script, action, result_html)
204
205 cat <<EOF
206os-info soil/diagnose.sh os-info -
207dump-env soil/diagnose.sh dump-env -
208py-all-and-ninja soil/worker.sh py-all-and-ninja -
209dev-shell-test build/dev-shell-test.sh soil-run -
210vm-baseline benchmarks/vm-baseline.sh soil-run _tmp/vm-baseline/index.html
211compute benchmarks/compute.sh soil-run _tmp/compute/index.html
212gc benchmarks/gc.sh soil-run _tmp/gc/index.html
213mycpp-benchmarks benchmarks/mycpp.sh soil-run _tmp/mycpp-examples/index.html
214id-test benchmarks/id-test.sh soil-run -
215EOF
216}
217
218bloaty-tasks() {
219 cat <<EOF
220os-info soil/diagnose.sh os-info -
221dump-env soil/diagnose.sh dump-env -
222wait-for-tarball soil/wait.sh for-cpp-tarball -
223test-tar devtools/release-native.sh test-tar -
224native-code metrics/native-code.sh oils-for-unix _tmp/metrics/oils-for-unix/
225EOF
226}
227
228benchmarks2-tasks() {
229 # Note: id-test doesn't run in 'other-tests' because 'gawk' isn't in that image
230 cat <<EOF
231os-info soil/diagnose.sh os-info -
232dump-env soil/diagnose.sh dump-env -
233wait-for-tarball soil/wait.sh for-cpp-tarball -
234test-tar devtools/release-native.sh test-tar -
235py-source build/py.sh py-source -
236uftrace benchmarks/uftrace.sh soil-run _tmp/uftrace/index.html
237gc-cachegrind benchmarks/gc-cachegrind.sh soil-run _tmp/gc-cachegrind/index.html
238EOF
239 # 2025-01: added py-source because benchmarks use cmark.py, which uses
240 # htm8_asdl to ExpandLinks() and so forth
241}
242
243# Reuses ovm-tarball container - to compare shells
244
245# TODO:
246# - test/syscall - run with osh-cpp or osh-static
247# - put it back in soil-benchmarks
248# - this builds it in place, with Ninja
249#
250# - benchmarks3 can use soil-benchmarks2 image
251# - and then run wait-for-tarball; osh-parser; osh-runtime
252
253benchmarks3-tasks() {
254 # (task_name, script, action, result_html)
255 # (task_name, script, action, result_html)
256 cat <<EOF
257os-info soil/diagnose.sh os-info -
258dump-env soil/diagnose.sh dump-env -
259py-all-and-ninja soil/worker.sh py-all-and-ninja -
260benchmark-build soil/cpp-tarball.sh benchmark-build -
261osh-parser benchmarks/osh-parser.sh soil-run _tmp/osh-parser/index.html
262osh-runtime benchmarks/osh-runtime.sh soil-run _tmp/osh-runtime/index.html
263EOF
264# TODO: download tarball, like soil-benchmarks2?
265# wait-for-tarball soil/wait.sh for-cpp-tarball -
266
267 return
268 cat <<EOF
269os-info soil/diagnose.sh os-info -
270dump-env soil/diagnose.sh dump-env -
271py-all build/py.sh all -
272EOF
273
274
275# missing curl !
276# wait-for-tarball soil/wait.sh for-cpp-tarball -
277
278# missing ninja !
279# osh-runtime benchmarks/osh-runtime.sh soil-run _tmp/osh-runtime/index.html
280
281# Gah we really need better dependencies
282}
283
284cpp-spec-tasks() {
285 # (task_name, script, action, result_html)
286
287 cat <<EOF
288os-info soil/diagnose.sh os-info -
289dump-env soil/diagnose.sh dump-env -
290py-all-and-ninja soil/worker.sh py-all-and-ninja -
291oils-cpp-smoke build/native.sh soil-run -
292osh-all test/spec-cpp.sh osh-all _tmp/spec/osh-cpp/compare.html
293ysh-all test/spec-cpp.sh ysh-all _tmp/spec/ysh-cpp/compare.html
294ysh-py test/spec-py.sh ysh-all-serial _tmp/spec/ysh-py/index.html
295EOF
296}
297
298cpp-tarball-tasks() {
299 # Note: build-times task requires _build/oils.sh
300 # It's a bit redundant with test-tar
301
302 cat <<EOF
303os-info soil/diagnose.sh os-info -
304dump-env soil/diagnose.sh dump-env -
305py-all-and-ninja soil/worker.sh py-all-and-ninja -
306oils-cpp-smoke build/native.sh soil-run -
307make-tar devtools/release-native.sh make-tar _release/oils-for-unix.tar
308xshar-hello devtools/xshar.sh soil-run-hello _release/hello-xshar.xshar
309xshar-test-oils devtools/xshar.sh soil-run-test-oils _release/test-oils.xshar
310build-times build/native.sh measure-build-times -
311EOF
312
313# build-times is a good enough test
314# test-tar devtools/release-native.sh test-tar -
315#
316# Note: tarball is deployed outside the container
317
318}
319
320cpp-small-tasks() {
321
322 # yaks could be moved to pea/ image once it has python2-dev
323 # Note: stdlib-test depends on 'ninja', so it's in cpp-small (formerly dev-minimal)
324
325 cat <<EOF
326os-info soil/diagnose.sh os-info -
327dump-env soil/diagnose.sh dump-env -
328py-all-and-ninja soil/worker.sh py-all-and-ninja -
329py-unit test/unit.sh all _test/py-unit/
330stdlib-test stdlib/TEST.sh soil-run -
331yaks yaks/TEST.sh soil-run -
332pea pea/TEST.sh run-tests -
333oils-cpp-smoke build/native.sh soil-run -
334cpp-unit test/cpp-unit.sh soil-run _test/-wwz-index
335headless client/run.sh soil-run-cpp -
336asan test/asan.sh soil-run -
337ltrace test/ltrace.sh soil-run -
338micro-syntax doctools/micro-syntax.sh soil-run -
339src-tree doctools/src-tree.sh soil-run _tmp/src-tree-www/index.html
340line-counts metrics/source-code.sh write-reports _tmp/metrics/line-counts/-wwz-index
341preprocessed metrics/source-code.sh preprocessed _tmp/metrics/preprocessed/-wwz-index
342mycpp-examples mycpp/TEST.sh soil-run _test/-wwz-index
343parse-errors test/parse-errors.sh soil-run-cpp -
344runtime-errors test/runtime-errors.sh soil-run-cpp -
345ysh-parse-errors test/ysh-parse-errors.sh soil-run-cpp -
346ysh-runtime-errors test/ysh-runtime-errors.sh soil-run-cpp -
347ysh-every-string test/ysh-every-string.sh soil-run-cpp -
348ysh-large ysh/run.sh soil-run-cpp -
349j8-errors data_lang/j8-errors.sh soil-run-cpp -
350error-catalog doc/error-catalog.sh soil-run-cpp -
351houston-fp demo/houston-fp/run.sh soil-run -
352souffle-smoke-test test/souffle-smoke.sh soil-run -
353EOF
354}
355
356cpp-coverage-tasks() {
357 # dep notes: hnode_asdl.h required by expr_asdl.h in mycpp/examples
358
359 # TODO: make this work
360#tar-compile benchmarks/ovm-build.sh soil-run -
361 cat <<EOF
362os-info soil/diagnose.sh os-info -
363dump-env soil/diagnose.sh dump-env -
364py-all-and-ninja soil/worker.sh py-all-and-ninja -
365extract-clang deps/from-binary.sh extract-clang-in-container -
366mycpp-unit-coverage mycpp/TEST.sh unit-test-coverage _test/clang-coverage/mycpp/html/index.html
367mycpp-examples-coverage mycpp/TEST.sh examples-coverage _test/clang-coverage/mycpp/examples/html/index.html
368cpp-coverage cpp/TEST.sh coverage _test/clang-coverage/cpp/html/index.html
369unified-coverage test/coverage.sh unified-report _test/clang-coverage/unified/html/index.html
370compare-gcc-clang metrics/native-code.sh compare-gcc-clang _tmp/metrics/compare-gcc-clang.txt
371EOF
372}
373
374ovm-tarball-tasks() {
375 ### Print tasks for the 'ovm-tarball' build
376
377 # notes:
378 # - py-all needed to crawl dependencies to make tarball.
379
380 # (task_name, script, action, result_html)
381 cat <<EOF
382os-info soil/diagnose.sh os-info -
383dump-env soil/diagnose.sh dump-env -
384py-all build/py.sh all -
385configure devtools/release.sh configure-for-release -
386make-tarball devtools/release.sh py-tarball _release/oils-ref.tar
387syscall test/syscall.sh soil-run _tmp/syscall/-wwz-index
388osh-spec test/spec-py.sh osh-all-serial _tmp/spec/osh-py/index.html
389gold test/gold.sh soil-run -
390osh-usage test/osh-usage.sh soil-run -
391tools-deps test/tools-deps.sh soil-run -
392ninja-config soil/worker.sh ninja-config -
393docs build/doc.sh soil-run _release/VERSION/index.html
394doc-metrics echo no-op _release/VERSION/doc/metrics.txt
395check-docs data_lang/htm8-test.sh soil-run -
396EOF
397# Notes:
398# - 'docs' depends on 'ninja-config' to run build/ninja_main.py, which makes
399# _build/oils.sh. Maybe all the docs need to be in Ninja
400# - doc-metrics is a no-op, just for the link. Because soil-run just runs the
401# release, which creates metrics.
402}
403
404app-tests-tasks() {
405
406 cat <<EOF
407os-info soil/diagnose.sh os-info -
408dump-env soil/diagnose.sh dump-env -
409py-all build/py.sh all -
410ble-clone test/ble.sh clone -
411ble-build test/ble.sh build -
412ble-test-osh-py test/ble.sh run-tests-osh-py -
413wait-for-tarball soil/wait.sh for-cpp-tarball -
414test-tar devtools/release-native.sh test-tar -
415ble-test-osh-cpp test/ble.sh run-tests-osh-cpp -
416EOF
417
418# 2025-02 - times out after 15 minutes? This is just bash, not OSH?
419# ble-bash-suite test/ble.sh bash-suite -
420
421# This doesn't work
422# ble-test-osh-bash test/ble.sh run-tests-osh-bash -
423}
424
425# TODO: Most of these should be Ninja tasks.
426# Other tests:
427# find-test, xargs-test, pgen2-test, web/table/csv2html-test.sh
428# Probably should start using a shell test framework too.
429other-tests-tasks() {
430 cat <<EOF
431os-info soil/diagnose.sh os-info -
432dump-env soil/diagnose.sh dump-env -
433build-minimal build/py.sh minimal -
434configure-test ./configure-test.sh soil_run -
435time-test benchmarks/time-test.sh soil-run -
436tsv-lib-test test/tsv-lib-test.sh soil-run -
437ysh-ify test/ysh-ify.sh soil-run -
438R-test devtools/R-test.sh soil-run -
439xargs-test test/other.sh xargs-test -
440csv2html-test test/other.sh csv2html-test -
441oil-python-symbols metrics/source-code.sh oil-python-symbols -
442opyc test/opyc.sh soil-run -
443opy-count-lines opy/soil.sh count-lines -
444test-gold opy/soil.sh test-gold -
445build-oils-repo opy/soil.sh build-oils-repo -
446regtest-compile opy/soil.sh regtest-compile -
447EOF
448
449# TODO: add this back after fixing transitive test enumeration problem
450# We shouldn't use
451
452# web-remote-test soil/web-remote-test.sh soil-run -
453}
454
455tests-todo() {
456 ### More tests to add
457 find . -name '_*' -a -prune -o -name '*-test.sh' -a -print
458
459 # pgen2/pgen2-test.sh seems mostly broken
460}
461
462# Redefinition for quicker cloud debugging
463maybe-merge-tasks() {
464 cat <<EOF
465os-info soil/diagnose.sh os-info -
466dump-env soil/diagnose.sh dump-env -
467maybe-merge soil/maybe-merge.sh soil-run -
468EOF
469}
470
471run-tasks() {
472 ### Run the tasks on stdin and write _tmp/soil/INDEX.tsv.
473 local job_name=$1
474 local out_dir=$2 # should already exist
475 local tty=$3
476
477 mkdir -p $out_dir/logs
478
479 # So we can run benchmarks/time_.py.
480 # 2023-02-28: Images like soil-wild based off the new soil-common no longer
481 # have 'cc'. Instead they use a wedge.
482 if command -v cc > /dev/null; then
483 build/py.sh time-helper
484 else
485 echo 'test time-tsv3'
486 time-tsv3 -o /tmp/echo.tsv --append -- echo hi
487
488 echo '/tmp/echo.tsv:'
489 cat /tmp/echo.tsv
490 fi
491
492 # For the later deploy step to pick up
493 date +%s > $out_dir/task-run-start-time.txt
494
495 # This data can go on the dashboard index
496 local tsv=$out_dir/INDEX.tsv
497 rm -f $tsv
498
499 local status
500 local max_status=0
501
502 while read task_name script action result_html; do
503 log "--- task: $task_name ---"
504
505 local log_path=$out_dir/logs/$task_name.txt
506
507 # 15 minutes per task
508 # One of the longest tasks is test/spec-cpp, which takes around 420 seconds
509 # TODO: should have a configurable timeout
510 local -a timeout=(timeout 900)
511 local stdin_tty=''
512
513 case $script in
514 test/process-table.sh)
515 # Workaround for weird interaction, see
516 # $ test/process-table.sh timeout-issue
517 timeout=()
518 ;;
519 test/nohup.sh)
520 # Only run test/nohup.sh with TTY. For some reason build/py.sh all hangs
521 # with $tty?
522 stdin_tty=$tty
523 ;;
524 esac
525
526 local -a argv=(
527 time-tsv3 -o $tsv --append
528 --field $task_name --field $script --field $action
529 --field $result_html --
530 "${timeout[@]}" "$script" "$action"
531 )
532
533 # Run task and save status
534 set +o errexit
535 if test -n "$stdin_tty"; then
536 # explicitly connect TTY, e.g. for soil/interactive
537 "${argv[@]}" > $log_path 2>&1 < $stdin_tty
538 else
539 # Temporary fix: build/doc.sh soil-run reads from stdin!
540 "${argv[@]}" > $log_path 2>&1 < /dev/null
541 fi
542 status=$?
543 set -o errexit
544
545 if test "$status" -gt "$max_status"; then
546 max_status=$status
547 fi
548
549 # Show the last line
550 echo
551 tsv-row status elapsed task script action result_html
552 tail -n 1 $tsv
553 echo
554 log "status=$status max_status=$max_status"
555 done
556
557 log '--- done ---'
558 ls -l $out_dir
559 wc -l $out_dir/logs/*
560
561 # This suppressed the deployment of logs, which we don't want. So all our
562 # Travis builds succeed? But then we can't use their failure notifications
563 # (which might be OK).
564 if false; then
565 # exit with the maximum exit code.
566 awk '
567 BEGIN { max = 0 }
568 { if ($1 > max) { max = $1 } }
569 END { exit(max) }
570 ' $tsv
571 fi
572
573 # To fail later. Important: this dir persists across jobs; it's NOT removed
574 # by 'host-shim.sh job-reset'.
575 mkdir -p _soil-jobs
576
577 # Hack: Assign job_id and write it to the status file. Other jobs can poll
578 # for completion of this job and access its resources.
579
580 local job_id
581 job_id="$(date +%Y-%m-%d__%H-%M-%S)"
582
583 # e.g. _soil-jobs/dummy.status.txt
584 echo "$max_status $job_id" > _soil-jobs/$job_name.status.txt
585}
586
587save-metadata() {
588 ### Write metadata files to be saved as JSON
589
590 # NOTE: host-shim.sh also writes image-pull-time.txt
591
592 local job_name=$1
593 local meta_dir=$2
594
595 echo "$job_name" > $meta_dir/job-name.txt
596
597 # command to show current branch
598 # This does NOT work in detached HEAD! Travis puts the branch in an env
599 # variable, but sr.ht doesn't.
600 # git rev-parse --abbrev-ref HEAD > $meta_dir/git-branch.txt
601
602 git log -n 1 --pretty='format:%H' > $meta_dir/commit-hash.txt
603
604 # ISO 8601 format
605 # Note: this can get confused with rebases. Two different commits can have
606 # the same date.
607 git log -n 1 --pretty='format:%aI' > $meta_dir/commit-date.txt
608
609 git log -n 1 --pretty='format:%s' > $meta_dir/commit-line.txt # "subject"
610}
611
612disable-git-errors() {
613
614 # 2023-02: The build started failing because of the permissions we set in
615 # soil/host-shim.sh mount-perms.
616 #
617 # The issue is that the guest needs to be able to write to the Docker mount
618 # of the repo. I think it may have been related to podman vs. Docker.
619 # Should check if mount-perms is necessary in both places.
620 #
621 # git fails unless we have this workaround.
622
623 # https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
624
625 # https://github.blog/2022-04-12-git-security-vulnerability-announced/
626
627 #git config --global --add safe.directory '*'
628
629 git config --global --add safe.directory /home/uke/oil
630}
631
632job-main() {
633 local job_name=$1
634
635 local out_dir=_tmp/soil
636
637 # Report for debugging
638 export EXTRA_MYCPP_ARGS='--stack-roots-warn 16'
639
640 log-context 'job-main'
641 mkdir -v -p $out_dir
642 ls -l -d $out_dir
643
644 disable-git-errors
645
646 save-metadata $job_name $out_dir
647
648 local captured
649
650 set +o errexit
651 captured=$(tty)
652 status=$?
653 set -o errexit
654
655 if test $status -eq 0; then
656 echo "TTY = $captured"
657 local tty=$captured
658 else
659 echo "captured = $captured"
660 local tty='' # clear the output
661 fi
662 echo
663
664 ${job_name}-tasks | run-tasks $job_name $out_dir "$tty"
665}
666
667JOB-dummy() { job-main 'dummy'; }
668JOB-raw-vm() { job-main 'raw-vm'; }
669JOB-dev-setup-debian() { job-main 'dev-setup-debian'; }
670JOB-dev-setup-fedora() { job-main 'dev-setup-fedora'; }
671JOB-dev-setup-alpine() { job-main 'dev-setup-alpine'; }
672
673JOB-dev-minimal() { job-main 'dev-minimal'; }
674JOB-interactive() { job-main 'interactive'; }
675
676JOB-other-tests() { job-main 'other-tests'; }
677
678JOB-pea() { job-main 'pea'; }
679
680JOB-ovm-tarball() { job-main 'ovm-tarball'; }
681JOB-app-tests() { job-main 'app-tests'; }
682
683JOB-cpp-coverage() { job-main 'cpp-coverage'; }
684JOB-cpp-small() { job-main 'cpp-small'; }
685JOB-cpp-tarball() { job-main 'cpp-tarball'; }
686JOB-cpp-spec() { job-main 'cpp-spec'; }
687
688JOB-bloaty() { job-main 'bloaty'; }
689JOB-benchmarks() { job-main 'benchmarks'; }
690JOB-benchmarks2() { job-main 'benchmarks2'; }
691JOB-benchmarks3() { job-main 'benchmarks3'; }
692
693JOB-wild() { job-main 'wild'; }
694
695JOB-maybe-merge() { job-main 'maybe-merge'; }
696
697list-jobs() {
698 # dev-setup-fedora for Fedora, disable
699
700 # 2025-04: temporarily disable dev-setup-debian, after cmake build issue
701 # Need to rewrite that with a shell script!
702 compgen -A function | grep -- '^JOB-' | sed 's/^JOB-//g' | egrep -v 'maybe-merge|dev-setup-fedora|dev-setup-alpine'
703}
704
705"$@"