Skip to content

Commit

Permalink
Adjust test-dyno Makefile to allow parallel on macOS (chapel-lang#2…
Browse files Browse the repository at this point in the history
…6030)

Adjust the Dyno tests Makefile target to correctly use concurrency (as
specified in `make` invocation) on macOS.

The problem was due to different syntax for capture groups and "or" on
macOS `sed`. Fixed by adjusting the `sed` invocation to work on either
macOS or GNU sed.

Getting a parallel run working also requires using GNU Make 4.x, which
isn't the default on macOS -- see [backing
issue](Cray/chapel-private#6770).

[reviewed by @DanilaFe , thanks!]

Resolves Cray/chapel-private#6770.

Testing:
- [x] `make -jN test-dyno` on my mac
- [x] `make -jN test-dyno` on chapdl
- [x] paratest cuz changing Makefiles is scary
  • Loading branch information
riftEmber authored Oct 8, 2024
2 parents da8ce92 + 2db13c1 commit 2605b1f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ frontend-shared: FORCE $(CHPL_CONFIG_CHECK) $(COMPILER_BUILD)

test-frontend: FORCE frontend-tests $(CHPL_CONFIG_CHECK) $(COMPILER_BUILD)
@echo "Running the frontend tests..."
JOBSFLAG=`echo "$$MAKEFLAGS" | sed -n 's/.*\(-j\|--jobs=\) *\([0-9][0-9]*\).*/-j\2/p'` ; \
JOBSFLAG=`echo "$$MAKEFLAGS" | sed -n -E 's/.*(-j|--jobs=) *([0-9][0-9]*).*/-j\2/p'` ; \
cd $(COMPILER_BUILD)/frontend/test && ctest $$JOBSFLAG . ;

frontend-tests: $(CHPL_CONFIG_CHECK) $(COMPILER_BUILD)
Expand Down

0 comments on commit 2605b1f

Please sign in to comment.