Skip to content

Conversation

@reubeno
Copy link
Owner

@reubeno reubeno commented Jan 19, 2026

No description provided.

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Test Results

    3 files     32 suites   15m 15s ⏱️
1 885 tests 1 885 ✅ 0 💤 0 ❌
5 630 runs  5 630 ✅ 0 💤 0 ❌

Results for commit ef6cb69.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 19, 2026

Performance Benchmark Report

Benchmark name Baseline (μs) Test/PR (μs) Delta (μs) Delta %
clone_shell_object 16.93 μs 16.49 μs -0.44 μs 🟢 -2.62%
eval_arithmetic 0.15 μs 0.15 μs -0.00 μs ⚪ Unchanged
expand_one_string 1.55 μs 1.57 μs 0.01 μs ⚪ Unchanged
for_loop 22.68 μs 22.42 μs -0.26 μs 🟢 -1.15%
function_call 2.12 μs 2.19 μs 0.07 μs ⚪ Unchanged
instantiate_shell 52.22 μs 51.70 μs -0.52 μs 🟢 -1.00%
instantiate_shell_with_init_scripts 24528.83 μs 24638.53 μs 109.70 μs ⚪ Unchanged
parse_bash_completion 2021.88 μs 2026.76 μs 4.88 μs ⚪ Unchanged
parse_sample_script 2.00 μs 1.99 μs -0.01 μs ⚪ Unchanged
run_echo_builtin_command 15.29 μs 15.15 μs -0.14 μs ⚪ Unchanged
tokenize_sample_script 3.50 μs 3.43 μs -0.07 μs 🟢 -1.91%

Code Coverage Report: Only Changed Files listed

Package Base Coverage New Coverage Difference
brush-builtins/src/declare.rs 🟢 85.98% 🟢 86.52% 🟢 0.54%
brush-builtins/src/set.rs 🟢 77.53% 🟢 80.18% 🟢 2.65%
brush-builtins/src/trap.rs 🟢 83.58% 🟢 98.51% 🟢 14.93%
brush-core/src/namedoptions.rs 🟠 74.79% 🟢 75.07% 🟢 0.28%
brush-core/src/results.rs 🟢 79.37% 🟢 80.16% 🟢 0.79%
brush-core/src/traps.rs 🟢 81.25% 🟢 86.46% 🟢 5.21%
brush-core/src/variables.rs 🟢 87.96% 🟢 88.66% 🟢 0.7%
brush-parser/src/ast.rs 🔴 45.09% 🔴 45.21% 🟢 0.12%
brush-parser/src/parser/mod.rs 🟢 100% 🟠 69.64% 🔴 -30.36%
brush-parser/src/parser/peg.rs 🟢 96.16% 🟢 96.44% 🟢 0.28%
brush-test-harness/src/execution.rs 🟢 80.75% 🟢 79.14% 🔴 -1.61%
Overall Coverage 🟢 74.89% 🟢 74.75% 🔴 -0.14%

Minimum allowed coverage is 70%, this run produced 74.75%

Test Summary: bash-completion test suite

Outcome Count Percentage
✅ Pass 1559 73.92
❗️ Error 18 0.85
❌ Fail 178 8.44
⏩ Skip 339 16.07
❎ Expected Fail 13 0.62
✔️ Unexpected Pass 2 0.09
📊 Total 2109 100.00

@reubeno reubeno marked this pull request as ready for review January 23, 2026 08:51
@reubeno reubeno requested a review from Copilot January 23, 2026 08:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR significantly expands test coverage for shell traps and related options by adding comprehensive test cases across four test files. The tests document expected bash-compatible behavior for trap handling, with proper annotations for known failures that help track implementation progress.

Changes:

  • Added 316 lines of tests for the functrace option (set -T) covering DEBUG and RETURN trap inheritance in functions, subshells, and other contexts
  • Added 318 lines of tests for the extdebug shell option covering DEBUG trap return value handling, BASH_ARGC/BASH_ARGV arrays, and declare -F behavior
  • Expanded errtrace.yaml from ~100 to 227 lines with additional tests for ERR trap inheritance in subshells, command substitution, pipelines, and nested functions
  • Expanded trap.yaml from ~190 to 695 lines with extensive new tests covering trap registration, inheritance patterns across execution contexts, RETURN trap behavior, signal handling, and trap -p edge cases

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
brush-shell/tests/cases/compat/options/functrace.yaml New file with 26 test cases covering functrace (-T) option behavior including DEBUG/RETURN trap inheritance in functions, subshells, command substitution, pipelines, and selective function tracing with declare -t
brush-shell/tests/cases/compat/options/extdebug.yaml New file with 26 test cases for extdebug option including DEBUG trap return value effects (skip/return commands), BASH_ARGC/BASH_ARGV population, declare -F source info, and interaction with other options
brush-shell/tests/cases/compat/options/errtrace.yaml Expanded with 16 new test cases covering ERR trap inheritance scenarios, reorganized with section comments, renamed one test for clarity, and added comprehensive coverage of pipelines, nested functions, and background jobs
brush-shell/tests/cases/compat/builtins/trap.yaml Massively expanded with 77 new test cases covering trap -l, comprehensive ERR trap scenarios, subshell/command substitution/pipeline/background job trap inheritance, RETURN trap behavior, signal handling, trap reset/clearing, trap -p edge cases, and DEBUG/EXIT trap advanced scenarios

@reubeno reubeno merged commit 6a4dda7 into main Jan 23, 2026
50 checks passed
@reubeno reubeno deleted the more-tests branch January 23, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants