Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TCP dump test #2155

Merged
merged 2 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ jobs:
run: ./bin/browsertime.js -b chrome --pageCompleteCheckNetworkIdle --xvfb http://127.0.0.1:3000/simple/
- name: Run test with check network idle in Firefox
run: ./bin/browsertime.js -b firefox --pageCompleteCheckNetworkIdle --xvfb http://127.0.0.1:3000/simple/
- name: Run test with tcp dump
run: ./bin/browsertime.js -b chrome --xvfb http://127.0.0.1:3000/simple/ -n 1 --tcpdump
- name: Run test with scripting.mjs
run: ./bin/browsertime.js -b chrome -n 1 --xvfb test/data/scripting/module.mjs
- name: Run test with scripting.cjs
Expand Down
5 changes: 4 additions & 1 deletion lib/support/tcpdump.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,10 @@ export class TCPDump {
this.tcpdumpProcess = execa('sudo', parameters);
}
async stop() {
return execa('sudo', ['pkill', '-9', 'tcpdump'], { reject: false });
if (this.tcpdumpProcess) {
await this.tcpdumpProcess.kill('SIGINT');
this.tcpdumpProcess = undefined;
}
}

async mv(url, iteration) {
Expand Down
Loading