File: run-tests

package info (click to toggle)
kvazaar 2.3.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,012 kB
  • sloc: ansic: 35,363; sh: 5,418; python: 362; cpp: 351; makefile: 325; awk: 10
file content (30 lines) | stat: -rwxr-xr-x 691 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/bin/bash

set -e

cd tests

# Prepare for running with installed kvazaar binary.
sed -i "s|../libtool execute ||g" "util.sh"
sed -i "s|../src/kvazaar|/usr/bin/kvazaar|g" "util.sh"

output=$(mktemp)

# Run all tests from upstream.
for filename in $(find ./test_*.sh | sort); do
    if [ "$filename" = "test_external_symbols.sh" ]; then
        # Skip test that checks built .a file for correct symbols. Will not work
        # from a binary installation.
        continue
    fi

    set +e
    ./"$filename" > "$output" 2>&1
    status=$?
    set -e
    if [ $status -ne 0 ]; then
        echo "Test $filename failed, exit code $status"
        cat "$output"
        exit 255
    fi
done