Skip to content

Commit 9373cbb

Browse files
authored
Merge pull request #1159 from lightpanda-io/make_test_filter_compiler
Filter out the huge compile command when using `make test`
2 parents fd6d038 + 9845392 commit 9373cbb

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,16 @@ wpt-summary:
9696
@printf "\e[36mBuilding wpt...\e[0m\n"
9797
@$(ZIG) build wpt -- --summary $(filter-out $@,$(MAKECMDGOALS)) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
9898

99-
## Test
99+
## Test - `grep` is used to filter out the huge compile command on build
100+
ifeq ($(OS), macos)
100101
test:
101-
@TEST_FILTER='${F}' $(ZIG) build test -freference-trace --summary all
102+
@script -q /dev/null sh -c 'TEST_FILTER="${F}" $(ZIG) build test -freference-trace --summary all' 2>&1 \
103+
| grep --line-buffered -v "^/.*zig test -freference-trace"
104+
else
105+
test:
106+
@script -qec 'TEST_FILTER="${F}" $(ZIG) build test -freference-trace --summary all' /dev/null 2>&1 \
107+
| grep --line-buffered -v "^/.*zig test -freference-trace"
108+
endif
102109

103110
## Run demo/runner end to end tests
104111
end2end:

src/browser/ScriptManager.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ pub fn addFromElement(self: *ScriptManager, element: *parser.Element, comptime c
212212
if (source == .@"inline" and self.scripts.first == null) {
213213
// inline script with no pending scripts, execute it immediately.
214214
// (if there is a pending script, then we cannot execute this immediately
215-
// as it needs to best executed in order)
215+
// as it needs to be executed in order)
216216
return script.eval(page);
217217
}
218218

0 commit comments

Comments
 (0)