Skip to content

Commit f826ca4

Browse files
authored
Fix CircleCI
1 parent 6d27d14 commit f826ca4

File tree

7 files changed

+73
-28
lines changed

7 files changed

+73
-28
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ jobs:
385385
- run:
386386
name: test-guava.sh
387387
command: export ORG_GRADLE_PROJECT_jdkTestVersion=25 && ./checker/bin-devel/test-guava.sh
388-
no_output_timeout: "30m"
388+
no_output_timeout: "50m"
389389

390390

391391
plume_lib_jdk25:

.circleci/defs.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ circleci_boilerplate($1,)
120120
- run:
121121
name: test-guava.sh
122122
command: export ORG_GRADLE_PROJECT_jdkTestVersion=$1 && ./checker/bin-devel/test-guava.sh
123-
no_output_timeout: "30m"
123+
no_output_timeout: "50m"
124124
])dnl
125125
dnl
126126
define([plume_lib_job], [dnl

build.gradle

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,27 +1162,27 @@ subprojects {
11621162
tasks.withType(Test) {
11631163
jvmArgs += compilerArgsForRunningCF
11641164

1165-
// maxParallelForks controls the parallelism of a single Test
1166-
// task. --parallel controls parallelism for the entire build.
1167-
1168-
// Run tests in parallel, except on CI where it seems to lead to flaky failures.
1169-
// The TF_BUILD environment variable is set to 'True' for jobs running on Azure Pipelines.
1170-
if (!System.getenv('TF_BUILD')?.equals('True')) {
1171-
// Not running under Azure Pipelines CI.
1172-
1173-
maxParallelForks = Runtime.runtime.availableProcessors() ?: 1
1174-
} else {
1175-
// Running under Azure Pipelines CI.
1176-
1177-
// Per Manu's comment above, on CI, parallelism seems to lead to flaky failures.
1178-
maxParallelForks = 1
1179-
1180-
// Fork the test to try to improve performance.
1181-
// https://docs.gradle.org/current/userguide/performance.html#fork_tests_into_multiple_processes
1182-
tasks.withType(Test) {
1183-
forkEvery = 25
1184-
}
1185-
}
1165+
// // maxParallelForks controls the parallelism of a single Test task.
1166+
// // --parallel controls parallelism for the entire build.
1167+
1168+
// // Run tests in parallel, except on CI where it seems to lead to flaky failures.
1169+
// // The TF_BUILD environment variable is set to 'True' for jobs running on Azure Pipelines.
1170+
// if (!System.getenv('TF_BUILD')?.equals('True')) {
1171+
// // Not running under Azure Pipelines CI.
1172+
1173+
// maxParallelForks = Runtime.runtime.availableProcessors() ?: 1
1174+
// } else {
1175+
// // Running under Azure Pipelines CI.
1176+
1177+
// // Per Manu's comment above, on CI, parallelism seems to lead to flaky failures.
1178+
// maxParallelForks = 1
1179+
1180+
// // Fork the test to try to improve performance.
1181+
// // https://docs.gradle.org/current/userguide/performance.html#fork_tests_into_multiple_processes
1182+
// tasks.withType(Test) {
1183+
// forkEvery = 25
1184+
// }
1185+
// }
11861186

11871187
if (project.name.is('checker')) {
11881188
dependsOn('assembleForJavac')

checker/bin-devel/clone-related.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,13 @@ export CHECKERFRAMEWORK="${CHECKERFRAMEWORK:-$(pwd -P)}"
1919
echo "CHECKERFRAMEWORK=$CHECKERFRAMEWORK"
2020
SCRIPT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)"
2121

22+
IS_CI="$("$SCRIPT_DIR"/is-ci.sh)"
23+
export IS_CI
24+
if [ -n "$IS_CI" ]; then
25+
# CircleCI fails, for the Daikon job only, if "-Dorg.gradle.daemon=false" is removed.
26+
export GRADLE_OPTS="${GRADLE_OPTS} -Dorg.gradle.daemon=false -Dorg.gradle.console=plain -Xmx4g"
27+
fi
28+
2229
export SHELLOPTS
2330
echo "SHELLOPTS=${SHELLOPTS}"
2431

checker/bin-devel/is-ci.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
#!/bin/sh
2+
3+
# Prints "yes" if this process is running under CI. Prints nothing otherwise.
4+
5+
if [ -n "$CI" ]; then
6+
echo "yes"
7+
elif [ -n "$APPVEYOR" ]; then
8+
echo "yes"
9+
elif [ -n "$AZURE_HTTP_USER_AGENT" ]; then
10+
echo "yes"
11+
elif [ -n "$TF_BUILD" ]; then
12+
echo "yes"
13+
elif [ -n "$CIRCLECI" ]; then
14+
echo "yes"
15+
elif [ -n "$GITHUB_ACTIONS" ]; then
16+
echo "yes"
17+
elif [ -n "$GITLAB_CI" ]; then
18+
echo "yes"
19+
elif [ -n "$TRAVIS" ]; then
20+
echo "yes"
21+
elif [ -n "$JENKINS_URL" ]; then
22+
echo "yes"
23+
elif [ -n "$BUILDKITE" ]; then
24+
echo "yes"
25+
elif [ -n "$TEAMCITY_VERSION" ]; then
26+
echo "yes"
27+
elif [ -n "$DRONE" ]; then
28+
echo "yes"
29+
elif [ -n "$DRONE_BUILD_NUMBER" ]; then
30+
echo "yes"
31+
elif [ -n "$BITBUCKET_BUILD_NUMBER" ]; then
32+
echo "yes"
33+
else
34+
true
35+
fi

checker/bin-devel/wpi-plumelib/test-wpi-plumelib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ test_wpi_plume_lib() {
8989
if ! cmp --quiet expected.txt actual.txt; then
9090
echo "Comparing $EXPECTED_FILE $ACTUAL_FILE in $(pwd)"
9191
diff -u expected.txt actual.txt
92-
if [ -n "$AZURE_HTTP_USER_AGENT" ] || [ -n "$CIRCLE_PR_USERNAME" ] || [ -n "$GITHUB_HEAD_REF" ] || [ "$TRAVIS" = "true" ]; then
92+
if [ -n "$("$CHECKERFRAMEWORK"/checker/bin-devel/is-ci.sh)" ]; then
9393
# Running under continuous integration. Output files that may be useful for debugging.
9494
echo "TESTDIR = ${TESTDIR}"
9595
echo "project = ${project}"

dataflow/src/main/java/org/checkerframework/dataflow/expression/ExpressionTreeToJavaExpressionVisitor.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -978,11 +978,14 @@ public JavaExpression visitBinary(BinaryTree exprTree, Void unused) {
978978
return types.getArrayType(componentType);
979979
} else if (typeTree instanceof JCTree.JCAnnotatedType) {
980980
return convertTreeToTypeMirror(((JCTree.JCAnnotatedType) typeTree).getUnderlyingType());
981+
} else if (typeTree instanceof JCTree.JCTypeApply) {
982+
return convertTreeToTypeMirror(((JCTree.JCTypeApply) typeTree).getType());
983+
} else {
984+
System.out.printf(
985+
"convertTreeToTypeMirror does not handle %s [%s]%n",
986+
typeTree, typeTree.getClass().getSimpleName());
987+
return null;
981988
}
982-
System.out.printf(
983-
"convertTreeToTypeMirror does not handle %s [%s]%n",
984-
typeTree, typeTree.getClass().getSimpleName());
985-
return null;
986989
}
987990

988991
// ///////////////////////////////////////////////////////////////////////////

0 commit comments

Comments
 (0)