diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 22cafc7e..4a8596bf 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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) diff --git a/main_test.go b/main_test.go index f4e6ab03..7b734879 100644 --- a/main_test.go +++ b/main_test.go @@ -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)))