File: run

package info (click to toggle)
jansson 2.14-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 2,060 kB
  • sloc: ansic: 8,267; sh: 370; cpp: 146; makefile: 138; python: 56
file content (36 lines) | stat: -rwxr-xr-x 833 bytes parent folder | download | duplicates (4)
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
31
32
33
34
35
36
#!/bin/sh
#
# Copyright (c) 2009-2016 Petri Lehtinen <petri@digip.org>
#
# Jansson is free software; you can redistribute it and/or modify
# it under the terms of the MIT license. See LICENSE for details.

is_test() {
    case "$test_name" in
        *.c|check-exports)
            return 0
            ;;
        *)
            return 1
            ;;
    esac
}

run_test() {
    if [ "$test_name" = "check-exports" ]; then
        test_log=$test_log $test_path >$test_log/stdout 2>$test_log/stderr
    else
        $test_runner $suite_builddir/${test_name%.c} \
            >$test_log/stdout \
            2>$test_log/stderr \
            || return 1
        valgrind_check $test_log/stderr || return 1
    fi
}

show_error() {
    valgrind_show_error && return
    cat $test_log/stderr
}

. $top_srcdir/test/scripts/run-tests.sh