Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export SHELLOPTS

. ./.travis-build-without-test.sh

./gradlew testCheckerInferenceScript
./gradlew testCheckerInferenceDevScript

./gradlew test
./gradlew test
10 changes: 10 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,16 @@ task release(type: Zip) {
baseName = 'release'
}


task testCheckerInferenceScript(type: Exec, dependsOn: dist) {
description 'Basic sanity check of scripts/inference'
executable './scripts/inference'
args = ['--mode', 'TYPECHECK',
'--checker', 'ostrusted.OsTrustedChecker',
'--solver', 'checkers.inference.solver.PropagationSolver',
'testdata/ostrusted/Test.java']
}

task testCheckerInferenceDevScript(type: Exec, dependsOn: [dist, dependenciesJar]) {
description 'Basic sanity check of scripts/inference-dev'
executable './scripts/inference-dev'
Expand Down
1 change: 1 addition & 0 deletions src/checkers/inference/InferenceLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public void typecheck(String [] javaFiles) {

final CheckerMain checkerMain = new CheckerMain(InferenceOptions.checkerJar, options);
checkerMain.addToRuntimeClasspath(getInferenceRuntimeJars());
checkerMain.addToClasspath(getInferenceRuntimeJars());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming seems a bit strange now. Do we actually need the runtime jars on both paths?
Isn't it enough to just have checker-qual.jar on the compilation classpath?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are qualifiers that are not in checker-qual.jar such as ostrusted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should add a checker-inference-qual.jar as the classpath dependency, instead of adding all runtime jars.
Can you add this as a comment here or open an issue?


if (InferenceOptions.printCommands) {
outStream.println("Running typecheck command:");
Expand Down
4 changes: 4 additions & 0 deletions testdata/ostrusted/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import ostrusted.qual.*;
// For basic sanity check.
class Test {
}