Skip to content

Commit 2b15081

Browse files
committed
fix: select packages by C example file rather than binding.gyp
`examples-random-c` was using `PACKAGES_PATTERN='binding.gyp'` to find candidate packages, but NAPI utility packages (e.g. `@stdlib/napi/argv-*`) have `binding.gyp` for their Node.js add-on yet ship no `examples/c/*.c` file. Selecting one of those packages caused `examples-c` to fail, which made the `random_examples` CI workflow fail on ~53% of runs (16/30). Changing to `PACKAGES_PATTERN='example.c'` targets the 1538 packages that actually have a compilable C example in their `examples/c/` directory, eliminating the false-positive package selection entirely.
1 parent f0362db commit 2b15081

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • tools/make/lib/examples

tools/make/lib/examples/c.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ examples-c-files:
113113
# make examples-random-c RANDOM_SELECTION_SIZE=10
114114
#/
115115
examples-random-c: $(NODE_MODULES)
116-
$(QUIET) $(MAKE) -f $(this_file) -s list-random-lib-pkgs PACKAGES_PATTERN='binding.gyp' | while read -r pkg; do \
116+
$(QUIET) $(MAKE) -f $(this_file) -s list-random-lib-pkgs PACKAGES_PATTERN='example.c' | while read -r pkg; do \
117117
echo ""; \
118118
echo "Running example: $$pkg"; \
119119
NODE_ENV="$(NODE_ENV_EXAMPLES)" \

0 commit comments

Comments
 (0)