diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e02a0f9ae..2665aa324 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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 diff --git a/lib/support/tcpdump.js b/lib/support/tcpdump.js index e34d07428..353a9a042 100644 --- a/lib/support/tcpdump.js +++ b/lib/support/tcpdump.js @@ -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) {