aboutsummaryrefslogtreecommitdiff
path: root/src/clients/cave/continue_on_failure_TEST
blob: ada9684a0c20bf6aea198f67f4a8cf660e30cd01 (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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env bash

export PALUDIS_HOME=`pwd`/continue_on_failure_TEST_dir/config/
export TEST_ROOT=`pwd`/continue_on_failure_TEST_dir/root/

./cave --environment :continue-on-failure-test \
        resolve -c -x --continue-on-failure if-satisfied a b c

if [[ -f continue_on_failure_TEST_dir/root/a ]] ; then
    exit 1
fi

if [[ -f continue_on_failure_TEST_dir/root/b ]] ; then
    exit 2
fi

if ! [[ -f continue_on_failure_TEST_dir/root/c ]] ; then
    exit 3
fi

if [[ -f continue_on_failure_TEST_dir/root/d ]] ; then
    exit 4
fi

if ! [[ -f continue_on_failure_TEST_dir/root/e ]] ; then
    exit 5
fi

./cave --environment :continue-on-failure-test \
        resolve -c -x =cat/w-1 cat/u --permit-old-version '*/*' || exit 6

./cave --environment :continue-on-failure-test \
        resolve -c -x --continue-on-failure if-independent x y z

if [[ -f continue_on_failure_TEST_dir/root/z ]] ; then
    exit 7
fi

if [[ -f continue_on_failure_TEST_dir/root/y ]] ; then
    exit 8
fi

if ! [[ -f continue_on_failure_TEST_dir/root/x ]] ; then
    exit 9
fi

if [[ -f continue_on_failure_TEST_dir/root/w ]] ; then
    exit 10
fi

if ! [[ -f continue_on_failure_TEST_dir/root/v ]] ; then
    exit 11
fi

exit 0