Skip to content

Fix CI test to check for actual script output #5

@bamcmanus

Description

@bamcmanus

The CI test in example/README.md has never passed because it checks for output that the script doesn't produce.

Current Behavior

The test in example/README.md expects the output to contain "SUCCESS":

echo "${output}" | grep -q "SUCCESS" || {
    echo >&2 "Wanted output containing 'SUCCESS' but got '${output}'"
    exit 1
}

However, bazel-diff.axl never outputs "SUCCESS". The script outputs messages like:

  • "Building //tools:bazel-diff executable..."
  • "Checking out merge base..."
  • "Generating Hashes for Base Revision..."
  • "Restoring current revision..."
  • "Diffing Hashes..."
  • "Impacted Targets for Revision..."

Expected Behavior

The CI test should check for output that the script actually produces.

Proposed Solution

Update the test to grep for "Impacted Targets" (the final message the script outputs on success) instead of "SUCCESS".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions