summaryrefslogtreecommitdiff
path: root/create-new-baseline
blob: 70465387e63fd94a2a467edcc19d516e9ff729a9 (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
#!/bin/bash

# Copyright (C) 2013, Linaro Limited.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# Author: Andrew McDermott <andrew.mcdermott@linaro.org>
#

: ${COMMIT_MSG:="New baseline"}
: ${CLEANUP:=0}
: ${URL:=http://snapshots.linaro.org/openembedded/sources}

version=aarch64-port
snapshot="openjdk8-${version}-snapshot"

if [ $CLEANUP -eq 1 ]; then
    git reset --hard
    git clean -f -d -x
fi

set -eu

if [ ! -f ${snapshot}.tar.bz2 ]; then
    wget --quiet ${URL}/${snapshot}.tar.bz2
fi

if [ ! -f ${snapshot}-prebuilt-classes.tar.bz2 ]; then
    wget --quiet ${URL}/${snapshot}-prebuilt-classes.tar.bz2
fi

if [ -d $snapshot ]; then
    git rm -rf $snapshot 2>/dev/null || echo "Success!"
fi

tar axf ${snapshot}-prebuilt-classes.tar.bz2
tar axf ${snapshot}.tar.bz2 ${snapshot}/jdk/test ${snapshot}/hotspot/test

shopt -s globstar

for i in known-problems/${snapshot}/**/*.txt; do
    echo "Adding $i >> ${i/known-problems\//}"
    cat $i >> ${i/known-problems\//}
done

git add ${snapshot}/jdk/test
git add ${snapshot}/hotspot/test
git add ${snapshot}/JTwork