Skip to content

Commit

Permalink
[soil] dev-setup-* back to building spec-bin
Browse files Browse the repository at this point in the history
This is before parallelization.  We can test how much xargs -P $nproc
helps.

build/deps.sh: Try out run-task-with-status.
  • Loading branch information
Andy C committed Jan 24, 2024
1 parent 5d6da36 commit 17e4ff9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 9 deletions.
21 changes: 17 additions & 4 deletions build/deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ spec-bin-wedges() {
### for test/spec-py.sh osh-all

# Can all be done in parallel
echo bash $BASH_VER
echo dash $DASH_VERSION
echo bash $BASH_VER
echo mksh $MKSH_VERSION
echo zsh $ZSH_VERSION
echo busybox $BUSYBOX_VERSION
Expand All @@ -594,8 +594,17 @@ maybe-install-wedge() {
local name=$1
local version=$2

if ! wedge-exists $name $version; then
deps/wedge.sh unboxed-build _build/deps-source/$name/
#if ! wedge-exists $name $version; then
if ! wedge-exists $name $version 'relative'; then
# TODO:
# - this doesn't have elapsed, user, sys, max_rss_KiB
# - name, version, output wedge dir should be columns too
# - total size, number of files would be useful too
# - we need logging too, and the log is another column
# - I guess that's just >log.txt 2>&1

local task_file=_build/wedge/logs/$name.task.txt
run-task-with-status $task_file deps/wedge.sh unboxed-build _build/deps-source/$name/
fi
}

Expand All @@ -604,6 +613,8 @@ install-wedges-fast() {
log "=== Installing $nproc wedges in parallel"
log ""

mkdir -p _build/wedge/logs

# TODO: because we're running in parallel, each one needs to write a separate
# task file. Like the spec tests.
#
Expand All @@ -612,7 +623,9 @@ install-wedges-fast() {
# test/wild-runner.sh - dump-html-and-translate-file()
# test/spec-runner.sh - dispatch-one -> run-task-with-status with test-common

py-wedges | xargs -P $nproc -n 2 -- $0 maybe-install-wedge
#py-wedges | xargs -P $nproc -n 2 -- $0 maybe-install-wedge

spec-bin-wedges | xargs -P $nproc -n 2 -- $0 maybe-install-wedge

# TODO: collect failures, and exit non-zero if anything fails
}
Expand Down
11 changes: 7 additions & 4 deletions soil/worker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,10 @@ py-all-and-ninja soil/worker.sh py-all-and-ninja -
smoke-test build/dev-setup-test.sh smoke-test -
wedge-report build/deps.sh wedge-report -
EOF
return
}

spec-bin-for() {
local distro=$1
cat <<EOF
os-info soil/diagnose.sh os-info -
dump-env soil/diagnose.sh dump-env -
Expand All @@ -90,7 +92,8 @@ EOF
dev-setup-debian-tasks() {
# (task_name, script, action, result_html)

dev-setup-for debian
#dev-setup-for debian
spec-bin-for debian
}

dev-setup-fedora-tasks() {
Expand All @@ -102,10 +105,10 @@ dev-setup-fedora-tasks() {
dev-setup-alpine-tasks() {
# (task_name, script, action, result_html)

dev-setup-for alpine
#dev-setup-for alpine
spec-bin-for alpine
}


pea-tasks() {
### Print tasks for the 'pea' build

Expand Down
2 changes: 1 addition & 1 deletion test/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ run-task-with-status() {
--output $out_file \
-- "$@" || true # suppress failure

# TODO: Use rows like this with oil
# TODO: Use rows like this in YSH
# '{"status": %x, "wall_secs": %e, "user_secs": %U, "kernel_secs": %S}' \
}

Expand Down

0 comments on commit 17e4ff9

Please sign in to comment.