aboutsummaryrefslogtreecommitdiff
path: root/testsuite/builddir-tests.sh
blob: 84993a497459a97b635f45ce594fb237b0f4da8f (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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# tests for the get_builddir function

echo "============= get_builddir() tests ================"

in="gdb-7.6~20121001+git3e2e76a.tar"
out="`get_builddir ${in}`"
#if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gdb-7.6~20121001+git3e2e76a"; then
#    pass "get_builddir: tarball uncompressed old git"
#else
#    fail "get_builddir: tarball uncompressed old git"
#    fixme "${in} returned ${out}"
#fi

in="gcc-linaro-4.8-2013.06-1.tar.xz"
out="`get_builddir ${in}`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gcc-linaro-4.8-2013.06-1"; then
    pass "get_builddir: tarball compressed"
else
    fail "get_builddir: tarball compressed"
    fixme "${in} returned ${out}"
fi

in="svn://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch"
out="`get_builddir ${in}`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gcc-4_7-branch"; then
    pass "get_builddir: svn branch"
else
    fail "get_builddir: svn branch"
    fixme "${in} returned ${out}"
fi

in="git://git.linaro.org/toolchain/binutils.git"
out="`get_builddir ${in}~binutils-2_18-branch@654321`"
match="${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch@654321"
if test x"${out}" = x"${match}"; then
    pass "get_builddir: git repository with branch and commit"
else
    fail "get_builddir: git repository with branch and commit"
    fixme "${in} returned '${out}' expected '${match}'"
fi

in="git://git.linaro.org/toolchain/binutils.git"
out="`get_builddir ${in}~binutils-2_18-branch/foo/bar@654321`"
match="${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch-foo-bar@654321"
if test x"${out}" = x"${match}"; then
    pass "get_builddir: git repository with branch and commit"
else
    fail "get_builddir: git repository with branch and commit"
    fixme "${in} returned '${out}' expected '${match}'"
fi


in="git://git.linaro.org/toolchain/binutils.git"
out="`get_builddir ${in}/binutils-2_18-branch@654321`"
match="${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch@654321"
if test x"${out}" = x"${match}"; then
    pass "get_builddir: git repository with branch and commit"
else
    fail "get_builddir: git repository with branch and commit"
    fixme "${in} returned '${out}' expected '${match}'"
fi

in="git://git.linaro.org/toolchain/binutils.git"
out="`get_builddir ${in}/binutils-2_18-branch/foo/bar@654321`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/binutils.git~binutils-2_18-branch-foo-bar@654321"; then
    pass "get_builddir: git repository with branch and commit"
else
    fail "get_builddir: git repository with branch and commit"
    fixme "${in} returned ${out}"
fi



in="gcc.git/linaro-4.8-branch"
out="`get_builddir ${in}`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/gcc.git~linaro-4.8-branch"; then
    pass "get_builddir: git repository with branch, no URL"
else
    fail "get_builddir: git repository with branch, no URL"
    fixme "get_builddir returned ${out}"
fi

in="infrastructure/gmp-5.1.2.tar.xz"
out="`get_builddir ${in}`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/infrastructure/gmp-5.1.2"; then
    pass "get_builddir: tarball in subdirectory"
else
    fail "get_builddir: tarball in subdirectory"
    fixme "${in} returned ${out}"
fi

in="git://git.linaro.org/toolchain/binutils-gdb.git"
out="`get_builddir ${in}~linaro_binutils-2_24-branch`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/binutils-gdb.git~linaro_binutils-2_24-branch"; then
    pass "get_builddir: merged binutils-gdb.git repository without second parameter to get_builddir."
else
    fail "get_builddir: merged binutils-gdb.git repository without second parameter to get_builddir."
    fixme "${in} returned ${out}"
fi

in="git://git.linaro.org/toolchain/binutils-gdb.git"
out="`get_builddir ${in}~linaro_binutils-2_24-branch binutils`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/binutils-gdb.git~linaro_binutils-2_24-branch-binutils"; then
    pass "get_builddir: merged binutils-gdb.git repository with second parameter to get_builddir."
else
    fail "get_builddir: merged binutils-gdb.git repository with second parameter to get_builddir."
    fixme "${in} returned ${out}"
fi

in="git://git.linaro.org/toolchain/binutils-gdb.git"
out="`get_builddir ${in}~master binutils`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/binutils-gdb.git~master-binutils"; then
    pass "get_builddir: merged binutils-gdb.git repository with master branch and binutils as a second parameter."
else
    fail "get_builddir: merged binutils-gdb.git repository with master branch and binutils as a second parameter."
    fixme "${in} returned ${out}"
fi

in="git://git.linaro.org/toolchain/binutils-gdb.git"
out="`get_builddir ${in}~master gdb`"
if test ${out} = "${local_builds}/${build}/x86_64-linux-gnu/binutils-gdb.git~master-gdb"; then
    pass "get_builddir: merged binutils-gdb.git repository with master branch and gdb as a second parameter."
else
    fail "get_builddir: merged binutils-gdb.git repository with master branch and gdb as a second parameter."
    fixme "${in} returned ${out}"