-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15778 from smowton/smowton/admin/test-multi-relea…
…se-jars Java: Add tests for multi-release jars under Java 11 and 17
- Loading branch information
Showing
14 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
...tegration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
| Annotation processors enabled: true | 1 | | ||
| Number of calls with call target | 1 | | ||
| Number of calls with missing call target | 0 | | ||
| Number of expressions with known type | 1 | | ||
| Number of expressions with unknown type | 0 | | ||
| Number of files | 543 | | ||
| Number of files with extension class | 538 | | ||
| Number of files with extension jar | 1 | | ||
| Number of files with extension java | 2 | | ||
| Number of files with extension properties | 1 | | ||
| Number of lines of code | 7 | | ||
| Number of lines of code with extension java | 7 | | ||
| Percentage of calls with call target | 100 | | ||
| Percentage of expressions with known type | 100 | | ||
| Total number of lines | 12 | | ||
| Total number of lines with extension java | 12 | | ||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 | | ||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 | |
1 change: 1 addition & 0 deletions
1
.../integration-tests/all-platforms/java/multi-release-jar-java11/ExtractorInformation.qlref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Telemetry/ExtractorInformation.ql |
3 changes: 3 additions & 0 deletions
3
...integration-tests/all-platforms/java/multi-release-jar-java11/mod1/mod1pkg/Mod1Class.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package mod1pkg; | ||
|
||
public class Mod1Class { } |
5 changes: 5 additions & 0 deletions
5
java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod1/module-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module moduleone { | ||
|
||
exports mod1pkg; | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/mod2pkg/User.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import mod1pkg.Mod1Class; | ||
|
||
public class User { | ||
|
||
private Mod1Class m1c; | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/mod2/module-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module moduletwo { | ||
|
||
requires moduleone; | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
java/ql/integration-tests/all-platforms/java/multi-release-jar-java11/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import sys | ||
|
||
from create_database_utils import * | ||
import subprocess | ||
import os | ||
|
||
try_use_java11() | ||
|
||
os.mkdir("mod1obj") | ||
os.mkdir("mod2obj") | ||
|
||
subprocess.check_call(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"]) | ||
subprocess.check_call(["jar", "-c", "-f", "mod1.jar", "-C", "mod1obj", "mod1pkg/Mod1Class.class", "--release", "9", "-C", "mod1obj", "module-info.class"]) | ||
|
||
run_codeql_database_create(["javac mod2/mod2pkg/User.java mod2/module-info.java -d mod2obj -p mod1.jar"], lang="java") |
18 changes: 18 additions & 0 deletions
18
...tegration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.expected
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
| Annotation processors enabled: true | 1 | | ||
| Number of calls with call target | 1 | | ||
| Number of calls with missing call target | 0 | | ||
| Number of expressions with known type | 1 | | ||
| Number of expressions with unknown type | 0 | | ||
| Number of files | 610 | | ||
| Number of files with extension class | 605 | | ||
| Number of files with extension jar | 1 | | ||
| Number of files with extension java | 2 | | ||
| Number of files with extension properties | 1 | | ||
| Number of lines of code | 7 | | ||
| Number of lines of code with extension java | 7 | | ||
| Percentage of calls with call target | 100 | | ||
| Percentage of expressions with known type | 100 | | ||
| Total number of lines | 12 | | ||
| Total number of lines with extension java | 12 | | ||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$AnnotationProcessor | 1 | | ||
| Used annotation processor: lombok.launch.AnnotationProcessorHider$ClaimingProcessor | 1 | |
1 change: 1 addition & 0 deletions
1
.../integration-tests/all-platforms/java/multi-release-jar-java17/ExtractorInformation.qlref
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Telemetry/ExtractorInformation.ql |
3 changes: 3 additions & 0 deletions
3
...integration-tests/all-platforms/java/multi-release-jar-java17/mod1/mod1pkg/Mod1Class.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package mod1pkg; | ||
|
||
public class Mod1Class { } |
5 changes: 5 additions & 0 deletions
5
java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod1/module-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module moduleone { | ||
|
||
exports mod1pkg; | ||
|
||
} |
7 changes: 7 additions & 0 deletions
7
java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/mod2pkg/User.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import mod1pkg.Mod1Class; | ||
|
||
public class User { | ||
|
||
private Mod1Class m1c; | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/mod2/module-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module moduletwo { | ||
|
||
requires moduleone; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
java/ql/integration-tests/all-platforms/java/multi-release-jar-java17/test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import sys | ||
|
||
from create_database_utils import * | ||
import subprocess | ||
import os | ||
|
||
os.mkdir("mod1obj") | ||
os.mkdir("mod2obj") | ||
|
||
subprocess.check_call(["javac", "mod1/module-info.java", "mod1/mod1pkg/Mod1Class.java", "-d", "mod1obj"]) | ||
subprocess.check_call(["jar", "-c", "-f", "mod1.jar", "-C", "mod1obj", "mod1pkg/Mod1Class.class", "--release", "9", "-C", "mod1obj", "module-info.class"]) | ||
|
||
run_codeql_database_create(["javac mod2/mod2pkg/User.java mod2/module-info.java -d mod2obj -p mod1.jar"], lang="java") |