summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStefan Zeiger <szeiger@novocode.com>2016-06-14 12:38:58 +0200
committerStefan Zeiger <szeiger@novocode.com>2016-06-14 15:54:01 +0200
commitf2d0f1e85d8b348cd2506a45502e4e59f9ec8e49 (patch)
tree340370a3c4cac8da3a43886d1edffd1bac636bdf /scripts
parent91b6944480a3b37f1d62a8a2ed3c332ce02a835a (diff)
downloadscala-f2d0f1e85d8b348cd2506a45502e4e59f9ec8e49.tar.gz
scala-f2d0f1e85d8b348cd2506a45502e4e59f9ec8e49.tar.bz2
scala-f2d0f1e85d8b348cd2506a45502e4e59f9ec8e49.zip
Use sbt for PR validation
- Support directories in `-doc-external-doc`: It is documented as accepting a “classpath_entry_path” for the keys but this only worked for JARs and not for individual class files. When checking for external-doc mappings for a Symbol, we now find the root directory relative to a class file instead of using the full class file path. The corresponding tests for SI-191 and SI8557 are also fixed to support individual class files instead of JARs in partest. This is required for the sbt build which runs partest on “quick” instead of “pack”. - Fix version and repository handling for bootstrapping. The bootstrap `scalaInstance` can now be resolved from any repository added to the project (not just the bootstrap repositories) by using a different workaround for https://github.com/sbt/sbt/issues/1872. - Workaround for https://github.com/sbt/sbt/issues/2640 (putting the wrong `scalaInstance` on partest’s classpath). The required `ScalaInstance` constructor is deprecated, so we have to disable deprecation warnings and fatal warnings until there is a better fix. - Add MiMa to the sbt build (port of the old `test.bc` ant task). The sbt-mima plugin doesn’t have all the features we need, so we do it manually in a similar way to what the plugin does. Checks are done in both directions for the `library` and `compiler` projects. The base version has to be set in `build.sbt`. When set to `None`, MiMa checks are skipped. MiMa checks are run sequentially to avoid spurious errors (see https://github.com/typesafehub/migration-manager/issues/115). - Port the OSGi tests to the sbt build. The set of JARs that gets copied into build/osgi as bundles is a bit different from the ant build. We omit the source JARs but add additional modules that are part of the Scala distribution, which seems more correct. - Get rid up `pull-binary-libs.sh` for the sbt build. Add artifacts are resolved from the special bootstrap repository through Ivy. The special `code.jar` and `instrumented.jar` artifacts are copied to the location where partest expects them (because these paths are hardcoded in partest). Other extra JARs for partest in `test/files/lib` are referenced directly from the Ivy cache. - Move common settings that should be available with unqualified names in local `.sbt` files and on the command line into an auto-plugin. - Add an `antStyle` setting to sbt to allow users to easily enable ant-style incremental compilation instead of sbt’s standard name hashing with `set antStyle := true`. - Disable verbose `info`-level logging during sbt startup for both, `validate/test` and `validate/publish-core` jobs. Update logging is no longer disabled when running locally (where it is useful and doesn’t generate excessive output). - Pass optimization flags for scalac down to partest, using the new partest version 1.0.15\6. - Call the new sbt-based PR validation from `scripts/jobs/validate/test`. - Disable the tests `run/t7843-jsr223-service` and `run/t7933` from https://github.com/scala/scala/pull/4959 for now. We need to set up a new test project (either partest or junit) that can run them on a packaged version of Scala, or possibly move them into a separate project that would naturally run from a packaged Scala as part of the community build.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/jobs/validate/publish-core4
-rwxr-xr-xscripts/jobs/validate/test35
2 files changed, 29 insertions, 10 deletions
diff --git a/scripts/jobs/validate/publish-core b/scripts/jobs/validate/publish-core
index bb0056722d..b0bfd48083 100755
--- a/scripts/jobs/validate/publish-core
+++ b/scripts/jobs/validate/publish-core
@@ -16,7 +16,7 @@ case $prDryRun in
;;
*)
echo ">>> Getting Scala version number."
- $SBT_CMD "setupPublishCore $prRepoUrl" generateBuildCharacterPropertiesFile
+ $SBT_CMD --warn "setupPublishCore $prRepoUrl" generateBuildCharacterPropertiesFile
parseScalaProperties buildcharacter.properties # produce maven_version_number
echo ">>> Checking availability of Scala ${maven_version_number} in $prRepoUrl."
@@ -27,7 +27,7 @@ case $prDryRun in
if $libraryAvailable && $reflectAvailable && $compilerAvailable; then
echo "Scala core already built!"
else
- $SBT_CMD "setupPublishCore $prRepoUrl" $antBuildArgs publish
+ $SBT_CMD --warn "setupPublishCore $prRepoUrl" publish
fi
mv buildcharacter.properties jenkins.properties # parsed by the jenkins job
diff --git a/scripts/jobs/validate/test b/scripts/jobs/validate/test
index bedef2e458..3cd8af5608 100755
--- a/scripts/jobs/validate/test
+++ b/scripts/jobs/validate/test
@@ -1,17 +1,36 @@
-#!/bin/bash -e
+#!/bin/bash -e -v -x
+
+baseDir=${WORKSPACE-`pwd`}
+scriptsDir="$baseDir/scripts"
+. $scriptsDir/common
case $prDryRun in
+
yep)
echo "DRY RUN"
;;
+
*)
- ./pull-binary-libs.sh
# build quick using STARR built upstream, as specified by scalaVersion
- # (in that sense it's locker, since it was built with starr by that upstream job)
- ant -Dstarr.version=$scalaVersion \
- -Dscalac.args.optimise=-optimise \
- -Dlocker.skip=1 -Dextra.repo.url=$prRepoUrl \
- $testExtraArgs ${testTarget-test.core docs.done}
+ # (in that sense it's locker, since it was built with starr by that upstream job);
+ # and run JUnit tests, partest, OSGi tests, MiMa and scaladoc
+ $SBT_CMD \
+ -Dstarr.version=$scalaVersion \
+ --warn \
+ "setupValidateTest $prRepoUrl" \
+ $testExtraArgs \
+ "test" \
+ "partest run pos neg jvm" \
+ "partest res scalap specialized scalacheck" \
+ "partest instrumented presentation" \
+ "partest --srcpath scaladoc" \
+ osgiTestFelix/test \
+ osgiTestEclipse/test \
+ library/mima \
+ reflect/mima \
+ doc
+
;;
-esac \ No newline at end of file
+
+esac