Skip to content

Commit

Permalink
Update Gradle tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dnestoro committed Oct 26, 2023
1 parent 5b632b8 commit 522ff33
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ class JavaApplicationFunctionalTest extends AbstractFunctionalTest {
def pgoFile = file("build/native/nativeCompile/default.iprof")

given:
withSample("java-application")
withSample("java-application", false)
buildFile << """
graalvmNative {
useArgFile = false // required to check for --pgo flag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,19 @@ abstract class AbstractFunctionalTest extends Specification {
Files.createDirectory(testDirectory)
}

protected void withSample(String name) {
protected void withSample(String name, boolean quickBuildMode = true) {
File sampleDir = new File("../samples/$name")
FileUtils.copyDirectory(sampleDir.toPath(), testDirectory)

if (quickBuildMode) {
buildFile << """
graalvmNative {
binaries.all {
buildArgs.add("-Ob")
}
}
""".stripIndent()
}
}

void run(String... args) {
Expand Down

0 comments on commit 522ff33

Please sign in to comment.