-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(e2e): Add Makefile to make running specific e2e test apps easier #18953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
ca58d79 to
37d9793
Compare
| echo "Error: fzf is required. Install with: brew install fzf"; \ | ||
| exit 1; \ | ||
| fi | ||
| @ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs -r yarn test:run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The Makefile uses xargs -r, which is a GNU-specific flag. This will cause the command to fail on macOS, which uses BSD xargs by default.
Severity: MEDIUM
Suggested Fix
Remove the -r flag from the xargs command. The default behavior of BSD xargs (used on macOS) is to not run the command if the input is empty, which achieves the same goal. This change will make the command compatible with both GNU and BSD systems.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: dev-packages/e2e-tests/Makefile#L8
Potential issue: The `make run` command in `dev-packages/e2e-tests/Makefile` pipes
output to `xargs -r`. The `-r` flag is a GNU extension and is not supported by the BSD
version of `xargs` that is the default on macOS. Since the project's documentation
explicitly instructs macOS users to install dependencies using Homebrew, it is a primary
target development platform. Consequently, any developer on macOS attempting to use this
documented command will encounter an `xargs: illegal option -- r` error, preventing the
test runner from executing.
Did we get this right? 👍 / 👎 to inform future reviews.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope, it runs on mac.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| echo "Error: fzf is required. Install with: brew install fzf"; \ | ||
| exit 1; \ | ||
| fi | ||
| @ls test-applications | fzf --height=10 --layout=reverse --border=rounded --margin=1.5% --color=dark --prompt="yarn test:run " | xargs -r yarn test:run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xargs -r flag incompatible with macOS
High Severity
The xargs -r flag is a GNU extension not available in BSD xargs on macOS. Since the documentation instructs users to install fzf via brew (macOS-specific), the Makefile will fail on macOS with error xargs: illegal option -- r. This prevents the entire feature from working on its primary target platform.
| .PHONY: run list | ||
|
|
||
| run: | ||
| @if ! command -v fzf &> /dev/null; then \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bash-specific redirection syntax breaks on POSIX shells
High Severity
The &> redirection syntax is bash-specific and not POSIX-compliant. Since the Makefile doesn't specify SHELL := /bin/bash, it defaults to /bin/sh which is dash on many Linux systems including Ubuntu. This causes a syntax error preventing the fzf check from working on non-bash systems. The POSIX-compliant alternative is >/dev/null 2>&1.
We have many e2e test apps and it can be cumbersome to type in which exact app you want to run. This PR adds a Makefile that uses
fzfto give a better experience:Screenshot.2026-01-23.at.12.01.44.mp4
Note: Requires having
fzfinstalled viabrew install fzfor other package managers.