Welcome to mirror list, hosted at ThFree Co, Russian Federation.

run_tests.sh.in « tests - github.com/rpm-software-management/createrepo_c.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: db53cdc96d77baa7ef3ebc8dec3d9a12530b21e8 (plain)
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
#!/bin/bash

BINDIR="${CMAKE_BINARY_DIR}/tests/"
RET=0

# Next line is a hack
# Builds for epel6 doesn't have rpath setted and
# tests fails with a "libcreaterepo_c.so.0: cannot open shared
# object file: No such file or directory" error message.
export "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/src/:"

# Go to source dir (so test would be able to use testdata/ in this dir)
cd ${CMAKE_CURRENT_SOURCE_DIR}

# Iterate over compiled tests
for i in "$BINDIR"/test_*; do
    # Run only executable regular files with "test_" prefix
    if [ -f $i -a -x $i ]; then
        $i #execute the test
        if [ $? -ne 0 ]; then  RET=$(($RET+1)) ; fi
    fi
done

echo "Number of fails: $RET"
exit $RET