| 1 | #!/bin/sh |
| 2 | # autopkgtest for libopenshot-audio |
| 3 | # (C) 2020 Anton Gladky |
| 4 | |
| 5 | set -e |
| 6 | |
| 7 | # Run the demo, filtering out expected ALSA warnings |
| 8 | # These warnings are normal in CI environments without audio hardware/MIDI devices |
| 9 | # We use 'pipefail' logic by checking the test completes properly |
| 10 | output=$(/usr/bin/openshot-audio-demo 2>&1) |
| 11 | exit_code=$? |
| 12 | |
| 13 | # Filter and print output, removing ALSA warnings about missing /dev/snd/seq |
| 14 | echo "$output" | grep -v "ALSA lib.*open /dev/snd/seq failed" || true |
| 15 | |
| 16 | # Check if the demo completed successfully |
| 17 | if [ $exit_code -ne 0 ]; then |
| 18 | echo "ERROR: openshot-audio-demo failed with exit code $exit_code" >&2 |
| 19 | exit 1 |
| 20 | fi |
| 21 | |
| 22 | # Verify that the demo actually ran to completion |
| 23 | if ! echo "$output" | grep -q "Demo complete"; then |
| 24 | echo "ERROR: Audio demo did not complete properly" >&2 |
| 25 | exit 1 |
| 26 | fi |
| 27 | |
| 28 | exit 0 |