Skip to content

Commit 14c4f50

Browse files
committed
debug
1 parent e3c933d commit 14c4f50

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

.github/workflows/tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ jobs:
3131
with:
3232
chrome-version: stable
3333

34+
- name: Fix Chrome
35+
run: |
36+
sudo chown root:root /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
37+
sudo chmod 4755 /opt/hostedtoolcache/setup-chrome/chromium/stable/x64/chrome-sandbox
38+
3439
- name: Run tests
3540
run: |
3641
mkdir -p /tmp/ferrum

lib/ferrum/browser/process.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ def start
9898
end
9999

100100
env = Hash(@xvfb&.to_env).merge(@env)
101+
puts "=================== #{@command.to_a.inspect}"
101102
@pid = ::Process.spawn(env, *@command.to_a, process_options)
103+
puts "=================== #{@pid}"
102104
ObjectSpace.define_finalizer(self, self.class.process_killer(@pid))
103105

104106
parse_ws_url(read_io, @process_timeout)
@@ -154,6 +156,8 @@ def parse_ws_url(read_io, timeout)
154156
while (now = Utils::ElapsedTime.monotonic_time) < max_time
155157
begin
156158
output += read_io.read_nonblock(512)
159+
puts output
160+
output
157161
rescue IO::WaitReadable
158162
read_io.wait_readable(max_time - now)
159163
else

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
end
4747

4848
config.after(:all) do
49-
@browser.quit
49+
@browser&.quit
5050
end
5151

5252
config.before(:each) do

0 commit comments

Comments
 (0)