blob: 42b3af0e58a043811860e49f9beef8908a2df055 (
plain) (
blame)
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
|
#!/usr/bin/env bash
# Utility script to "bootstrap" Hudson Eclipse Platform Unit tests, to get the
# basic files needed to get all the other required files and start the test framework.
#BUILD_TECH=$1
#EBUILDER_HASH=$2
#WORKSPACE=$3
if [[ -z "${WORKSPACE}" ]]
then
echo "WORKSPACE not supplied, will assume current directory"
WORKSPACE=${PWD}
else
if [[ ! -d "${WORKSPACE}" ]]
then
echo "ERROR: WORKSPACE did not exist. Perhaps you meant its parent?"
exit 1
fi
fi
if [[ -z "${EBUILDER_HASH}" ]]
then
echo "EBUILDER HASH, BRANCH, or TAG was not supplied, assuming 'master'"
EBUILDER_HASH=master
fi
if [[ -z "${BUILD_TECH}" ]]
then
echo "BUILD_TECH not supplied, assuming PDE"
BUILD_TECH=PDE
fi
# remove just in case left from previous failed run
rm ebuilder.zip 2>/dev/null
rm -fr tempebuilder 2>/dev/null
if [[ "${BUILD_TECH}" == "CBI" ]]
then
EBUILDER=eclipse.platform.releng.aggregator
TARGETNAME=eclipse.platform.releng.aggregator
ESCRIPT_LOC=${EBUILDER}/production/testScripts
elif [[ "$BUILD_TECH" == "PDE" ]]
then
EBUILDER=eclipse.platform.releng.eclipsebuilder
TARGETNAME=org.eclipse.releng.eclipsebuilder
ESCRIPT_LOC=${TARGETNAME}
else
echo "ERROR: Unexpected value of BUILD_TECH: ${BUILD_TECH}"
exit 1
fi
wget -O ebuilder.zip --no-verbose http://git.eclipse.org/c/platform/${EBUILDER}.git/snapshot/${EBUILDER}-${EBUILDER_HASH}.zip 2>&1
unzip -q ebuilder.zip -d tempebuilder
mkdir -p ${WORKSPACE}/$TARGETNAME
rsync --recursive "tempebuilder/${EBUILDER}-${EBUILDER_HASH}/" "${WORKSPACE}/${TARGETNAME}/"
rccode=$?
if [[ $rccode != 0 ]]
then
echo "ERROR: rsync did not complete normally.rccode: $rccode"
exit $rccode
fi
# copy to well-known location so subsequent steps do not need to know which ebuilder they came from
cp ${WORKSPACE}/${ESCRIPT_LOC}/getBaseBuilder.xml ${WORKSPACE}
cp ${WORKSPACE}/${ESCRIPT_LOC}/runTests2.xml ${WORKSPACE}
# remove on clean exit
rm ebuilder.zip
rm -fr tempebuilder
exit 0
|