Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
diqiu50 committed Nov 20, 2024
1 parent 6dce7e9 commit 08d609b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions clients/gvfs-fuse/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

import org.gradle.api.tasks.Exec

val envFile = System.getenv("HOME") + "/.cargo/env"

val checkRustEnvironment by tasks.registering(Exec::class) {
description = "Check if Rust environment is properly set up using an external script"
group = "verification"
Expand All @@ -30,15 +32,15 @@ val compileRust by tasks.registering(Exec::class) {
dependsOn(checkRustEnvironment)
description = "Compile the Rust project"
workingDir = file("$projectDir")
commandLine("bash", "-c", "cargo build --release")
commandLine("bash", "-c", ". $envFile && cargo build --release")
}

val testRust by tasks.registering(Exec::class) {
dependsOn(checkRustEnvironment)
description = "Run tests in the Rust project"
group = "verification"
workingDir = file("$projectDir")
commandLine("bash", "-c", "cargo test --release")
commandLine("bash", "-c", ". $envFile && cargo test --release")

standardOutput = System.out
errorOutput = System.err
Expand Down

0 comments on commit 08d609b

Please sign in to comment.