fix tests

This commit is contained in:
aler9 2021-02-13 20:54:20 +01:00
parent fa381c73ac
commit a42419eae3
2 changed files with 4 additions and 2 deletions

View File

@ -19,6 +19,8 @@ jobs:
with:
go-version: "1.15"
- run: sudo apt-get install -y --no-install-recommends ffmpeg
- run: make test-nodocker
- run: bash <(curl -s https://codecov.io/bash)

View File

@ -930,8 +930,8 @@ func TestRTMP(t *testing.T) {
func TestRunOnDemand(t *testing.T) {
doneFile := filepath.Join(os.TempDir(), "ondemand_done")
onDemandFile, err := writeTempFile([]byte(fmt.Sprintf(`#!/bin/sh -e
trap 'touch %s; kill $(jobs -p)' INT
onDemandFile, err := writeTempFile([]byte(fmt.Sprintf(`#!/bin/sh
trap 'touch %s; [ -z "$(jobs -p)" ] || kill $(jobs -p)' INT
ffmpeg -hide_banner -loglevel error -re -i testimages/ffmpeg/emptyvideo.ts -c copy -f rtsp rtsp://localhost:$RTSP_PORT/$RTSP_PATH &
wait
`, doneFile)))