mirror of
https://github.com/lightpanda-io/browser.git
synced 2025-10-28 14:43:28 +00:00
Simplify filter and try to make it work with progressive build info
This commit is contained in:
22
Makefile
22
Makefile
@@ -96,20 +96,16 @@ wpt-summary:
|
|||||||
@printf "\e[36mBuilding wpt...\e[0m\n"
|
@printf "\e[36mBuilding wpt...\e[0m\n"
|
||||||
@$(ZIG) build wpt -- --summary $(filter-out $@,$(MAKECMDGOALS)) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
|
@$(ZIG) build wpt -- --summary $(filter-out $@,$(MAKECMDGOALS)) || (printf "\e[33mBuild ERROR\e[0m\n"; exit 1;)
|
||||||
|
|
||||||
## Test - `awk` is used to filter out the huge compile command on build
|
## Test - `grep` is used to filter out the huge compile command on build
|
||||||
|
ifeq ($(OS), macos)
|
||||||
test:
|
test:
|
||||||
@TEST_FILTER='${F}' $(ZIG) build test -freference-trace --summary all 2>&1 | awk '\
|
@script -q /dev/null sh -c 'TEST_FILTER="${F}" $(ZIG) build test -freference-trace --summary all' 2>&1 \
|
||||||
/^error: the following command failed/ {\
|
| grep --line-buffered -v "^/.*zig test -freference-trace"
|
||||||
print "error: compilation command failed (command output suppressed for brevity)";\
|
else
|
||||||
while (getline > 0) {\
|
test:
|
||||||
if (/^error:/ || /^Build Summary:/ || /^build\.zig:/) {\
|
@script -qec 'TEST_FILTER="${F}" $(ZIG) build test -freference-trace --summary all' /dev/null 2>&1 \
|
||||||
print;\
|
| grep --line-buffered -v "^/.*zig test -freference-trace"
|
||||||
break;\
|
endif
|
||||||
}\
|
|
||||||
}\
|
|
||||||
next;\
|
|
||||||
}\
|
|
||||||
{ print; }'
|
|
||||||
|
|
||||||
## Run demo/runner end to end tests
|
## Run demo/runner end to end tests
|
||||||
end2end:
|
end2end:
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ pub fn addFromElement(self: *ScriptManager, element: *parser.Element, comptime c
|
|||||||
if (source == .@"inline" and self.scripts.first == null) {
|
if (source == .@"inline" and self.scripts.first == null) {
|
||||||
// inline script with no pending scripts, execute it immediately.
|
// inline script with no pending scripts, execute it immediately.
|
||||||
// (if there is a pending script, then we cannot execute this immediately
|
// (if there is a pending script, then we cannot execute this immediately
|
||||||
// as it needs to best executed in order)
|
// as it needs to be executed in order)
|
||||||
return script.eval(page);
|
return script.eval(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user