Skip to content

Commit 8b33445

Browse files
committed
Merge remote-tracking branch 'origin/2.11.x' into merge/2.11.x-to-2.12.x-20150129
Conflicts: build.number src/library/scala/concurrent/Future.scala versions.properties
2 parents 020581e + 7b5998a commit 8b33445

File tree

204 files changed

+3368
-579
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+3368
-579
lines changed

build.number

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ version.patch=0
55
# This is the -N part of a version. if it's 0, it's dropped from maven versions.
66
version.bnum=0
77

8-
# Note: To build a release run ant with -Dbuild.release=true
9-
# To build an RC, run ant with -Dmaven.version.suffix=-RCN
8+
# To build a release, see scripts/jobs/scala-release-2.11.x-build
9+
# (normally run by the eponymous job on scala-ci.typesafe.com).

build.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ TODO:
280280

281281
<!-- Pax runner -->
282282
<property name="pax.exam.version" value="3.5.0"/><!-- Last version which supports Java 6 -->
283-
<property name="osgi.felix.version" value="4.0.3"/>
283+
<property name="osgi.felix.version" value="4.4.0"/>
284284
<property name="osgi.equinox.version" value="3.7.1"/>
285285
<artifact:dependencies pathId="pax.exam.classpath" filesetId="pax.exam.fileset">
286286
<dependency groupId="org.ops4j.pax.exam" artifactId="pax-exam-container-native" version="${pax.exam.version}">
@@ -294,6 +294,7 @@ TODO:
294294
<dependency groupId="ch.qos.logback" artifactId="logback-classic" version="1.1.2"/>
295295
<dependency groupId="junit" artifactId="junit" version="${junit.version}"/>
296296
</artifact:dependencies>
297+
<copy-deps project="pax.exam"/>
297298

298299
<artifact:dependencies pathId="osgi.framework.felix">
299300
<dependency groupId="org.apache.felix" artifactId="org.apache.felix.framework" version="${osgi.felix.version}"/>
@@ -1375,8 +1376,8 @@ TODO:
13751376
</target>
13761377

13771378
<target name="test.osgi" depends="test.osgi.comp">
1378-
<if><isset property="has.java8"/><then>
1379-
<echo message="Skipping OSGi JUnit tests on Java 8. See SI-8642"/>
1379+
<if><isset property="test.osgi.skip"/><then>
1380+
<echo message="Skipping OSGi JUnit tests"/>
13801381
</then><else>
13811382
<echo message="Running OSGi JUnit tests. Output in ${build-osgi.dir}"/>
13821383
<stopwatch name="test.osgi.timer"/>

scripts/common

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
# This is for forcibly stopping the job from a subshell (see test
2+
# below).
3+
trap "exit 1" TERM
4+
export TOP_PID=$$
5+
set -e
6+
7+
# Known problems : does not fare well with interrupted, partial
8+
# compilations. We should perhaps have a multi-dependency version
9+
# of do_i_have below
10+
11+
LOGGINGDIR="$WORKSPACE/logs"
12+
mkdir -p $LOGGINGDIR
13+
14+
unset SBT_HOME
15+
SBT_HOME="$WORKSPACE/.sbt"
16+
mkdir -p $SBT_HOME
17+
IVY_CACHE="$WORKSPACE/.ivy2"
18+
mkdir -p $IVY_CACHE
19+
rm -rf $IVY_CACHE/cache/org.scala-lang
20+
21+
# temp dir where all 'non-build' operation are performed
22+
TMP_ROOT_DIR=$(mktemp -d -t pr-scala.XXXX)
23+
TMP_DIR="${TMP_ROOT_DIR}/tmp"
24+
mkdir "${TMP_DIR}"
25+
26+
27+
# detect sed version and how to enable extended regexes
28+
SEDARGS="-n$(if (echo "a" | sed -nE "s/a/b/" &> /dev/null); then echo E; else echo r; fi)"
29+
30+
31+
32+
# :docstring test:
33+
# Usage: test <argument ..>
34+
# Executes <argument ..>, logging the launch of the command to the
35+
# main log file, and kills global script execution with the TERM
36+
# signal if the commands ends up failing.
37+
# DO NOT USE ON FUNCTIONS THAT DECLARE VARIABLES,
38+
# AS YOU'LL BE RUNNING IN A SUBSHELL AND VARIABLE DECLARATIONS WILL BE LOST
39+
# :end docstring:
40+
41+
function test() {
42+
echo "### $@"
43+
"$@"
44+
status=$?
45+
if [ $status -ne 0 ]; then
46+
say "### ERROR with $1"
47+
kill -s TERM $TOP_PID
48+
fi
49+
}
50+
51+
# :docstring say:
52+
# Usage: say <argument ..>
53+
# Prints <argument ..> to both console and the main log file.
54+
# :end docstring:
55+
56+
function say(){
57+
(echo "$@") | tee -a $LOGGINGDIR/compilation-$SCALADATE-$SCALAHASH.log
58+
}
59+
60+
# General debug logging
61+
# $* - message
62+
function debug () {
63+
echo "----- $*"
64+
}
65+
66+
function parseScalaProperties(){
67+
propFile="$baseDir/$1"
68+
if [ ! -f $propFile ]; then
69+
echo "Property file $propFile not found."
70+
exit 1
71+
else
72+
awk -f "$scriptsDir/readproperties.awk" "$propFile" > "$propFile.sh"
73+
. "$propFile.sh" # yeah yeah, not that secure, improvements welcome (I tried, but bash made me cry again)
74+
fi
75+
}
76+
77+
78+
## TAKEN FROM UBER-BUILD, except that it "returns" (via $RES) true/false
79+
# Check if an artifact is available
80+
# $1 - groupId
81+
# $2 - artifacId
82+
# $3 - version
83+
# $4 - extra repository to look in (optional)
84+
# return value in $RES
85+
function checkAvailability () {
86+
pushd "${TMP_DIR}"
87+
rm -rf *
88+
89+
# pom file for the test project
90+
cat > pom.xml << EOF
91+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
92+
<modelVersion>4.0.0</modelVersion>
93+
<groupId>com.typesafe</groupId>
94+
<artifactId>typesafeDummy</artifactId>
95+
<packaging>war</packaging>
96+
<version>1.0-SNAPSHOT</version>
97+
<name>Dummy</name>
98+
<url>http://127.0.0.1</url>
99+
<dependencies>
100+
<dependency>
101+
<groupId>$1</groupId>
102+
<artifactId>$2</artifactId>
103+
<version>$3</version>
104+
</dependency>
105+
</dependencies>
106+
<repositories>
107+
<repository>
108+
<id>sonatype.snapshot</id>
109+
<name>Sonatype maven snapshot repository</name>
110+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
111+
<snapshots>
112+
<updatePolicy>daily</updatePolicy>
113+
</snapshots>
114+
</repository>
115+
EOF
116+
117+
if [ -n "$4" ]
118+
then
119+
# adds the extra repository
120+
cat >> pom.xml << EOF
121+
<repository>
122+
<id>extrarepo</id>
123+
<name>extra repository</name>
124+
<url>$4</url>
125+
</repository>
126+
EOF
127+
fi
128+
129+
cat >> pom.xml << EOF
130+
</repositories>
131+
</project>
132+
EOF
133+
134+
set +e
135+
mvn "${MAVEN_ARGS[@]}" compile &> "${TMP_DIR}/mvn.log"
136+
RES=$?
137+
# Quiet the maven, but allow diagnosing problems.
138+
grep -i downloading "${TMP_DIR}/mvn.log"
139+
grep -i exception "${TMP_DIR}/mvn.log"
140+
grep -i error "${TMP_DIR}/mvn.log"
141+
set -e
142+
143+
# log the result
144+
if [ ${RES} == 0 ]
145+
then
146+
debug "$1:$2:jar:$3 found !"
147+
RES=true
148+
else
149+
debug "$1:$2:jar:$3 not found !"
150+
RES=false
151+
fi
152+
popd
153+
}

0 commit comments

Comments
 (0)