Skip to content

Commit 4e221d1

Browse files
authored
Merge pull request #1798 from githubnext/copilot/debug-agentic-workflow-failure-one-more-time
Fix e2e.sh to handle --workflow-dispatch-only flag
2 parents a0e31bf + 8afec4c commit 4e221d1

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

e2e.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,14 @@
2222
#
2323
# Options:
2424
# --dry-run Show what would be tested without running
25+
# --workflow-dispatch-only Only run tests that use workflow_dispatch trigger
26+
# (skip issue/comment/PR-triggered tests)
2527
# --help, -h Show help message
2628
#
2729
# Examples:
2830
# ./e2e.sh # Run all tests
2931
# ./e2e.sh --dry-run # See what would be tested
32+
# ./e2e.sh test-copilot-* --workflow-dispatch-only # Only workflow_dispatch tests
3033
#
3134
# Prerequisites:
3235
# - GitHub CLI (gh) installed and authenticated
@@ -78,6 +81,7 @@ TIMEOUT_MINUTES=10
7881
POLL_INTERVAL=5
7982
LOG_FILE="e2e-test-$(date +%Y%m%d-%H%M%S).log"
8083
TEMP_USER_PAT_SET=false
84+
WORKFLOW_DISPATCH_ONLY=false
8185

8286
# Utility functions
8387
log() {
@@ -1644,6 +1648,12 @@ run_tests() {
16441648

16451649
# Issue-triggered and command-triggered tests - need to enable, create trigger, wait
16461650
*)
1651+
if [[ "$WORKFLOW_DISPATCH_ONLY" == true ]]; then
1652+
info "Skipping '$workflow' (not a workflow_dispatch test; --workflow-dispatch-only is set)"
1653+
SKIPPED_TESTS+=("$workflow")
1654+
continue
1655+
fi
1656+
16471657
local workflow_file_path=".github/workflows/${workflow}.lock.yml"
16481658
if [[ ! -f "$workflow_file_path" ]]; then
16491659
error "Workflow file not found for '$workflow' at $workflow_file_path; marking as failed"
@@ -1842,11 +1852,17 @@ main() {
18421852
dry_run=true
18431853
shift
18441854
;;
1855+
--workflow-dispatch-only)
1856+
WORKFLOW_DISPATCH_ONLY=true
1857+
shift
1858+
;;
18451859
--help|-h)
18461860
echo "Usage: $0 [OPTIONS] [TEST_PATTERNS...]"
18471861
echo ""
18481862
echo "Options:"
18491863
echo " --dry-run, -n Show what would be tested without running"
1864+
echo " --workflow-dispatch-only Only run tests that use workflow_dispatch trigger"
1865+
echo " (skip issue/comment/PR-triggered tests)"
18501866
echo " --help, -h Show this help message"
18511867
echo ""
18521868
echo "TEST_PATTERNS:"

0 commit comments

Comments
 (0)