Skip to content

Commit 9845392

Browse files
committed
Simplify filter and try to make it work with progressive build info
1 parent 0795b7a commit 9845392

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

Makefile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +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 - `awk` is used to filter out the huge compile command on build
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 2>&1 | awk '\
102-
/^error: the following command failed/ {\
103-
print "error: compilation command failed (command output suppressed for brevity)";\
104-
while (getline > 0) {\
105-
if (/^error:/ || /^Build Summary:/ || /^build\.zig:/) {\
106-
print;\
107-
break;\
108-
}\
109-
}\
110-
next;\
111-
}\
112-
{ print; }'
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
113109

114110
## Run demo/runner end to end tests
115111
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)