Skip to content

Commit

Permalink
[interpreter] Update Makefile to ignore output of cd (#1683)
Browse files Browse the repository at this point in the history
The interpreter Makefile captures the output of cding into the unittest
directory and listing the unittest files it contains. Under some circumstances,
the `cd` command will print the new current directory, and that output was
incorrectly being interpreted as the path to a unittest, causing the build to
fail.

Fix this problem by redirecting the output of cd, if any, to /dev/null.

Fixes #1681.
  • Loading branch information
tlively authored Sep 22, 2023
1 parent b174a7d commit bfb21e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions interpreter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $(JSLIB):
# Unit tests

UNITTESTDIR = unittest
UNITTESTFILES = $(shell cd $(UNITTESTDIR); ls *.ml)
UNITTESTFILES = $(shell cd $(UNITTESTDIR) > /dev/null; ls *.ml)
UNITTESTS = $(UNITTESTFILES:%.ml=%)

.PHONY: unittest
Expand All @@ -62,7 +62,7 @@ unittest/%:
# Test suite

TESTDIR = ../test/core
TESTFILES = $(shell cd $(TESTDIR); ls *.wast; ls [a-z]*/*.wast)
TESTFILES = $(shell cd $(TESTDIR) > /dev/null; ls *.wast; ls [a-z]*/*.wast)
TESTS = $(TESTFILES:%.wast=%)

.PHONY: test partest quiettest
Expand Down

0 comments on commit bfb21e9

Please sign in to comment.