aboutsummaryrefslogtreecommitdiff
path: root/bazel
diff options
context:
space:
mode:
authorFabian Meumertzheim <fabian@meumertzhe.im>2021-10-14 19:16:30 +0200
committerFabian Meumertzheim <fabian@meumertzhe.im>2021-10-18 22:31:42 +0200
commitcfaf603bdc10b5654c933c5dabd6059715c24930 (patch)
tree706cc99e4f67fa8f77a1f046fb8d41e72e189924 /bazel
parent30730a60aeeca1d2ad20f14d0a0913bdef92bcb0 (diff)
downloadjazzer-api-cfaf603bdc10b5654c933c5dabd6059715c24930.tar.gz
Adapt rlocation to Windows in fuzz target test wrapper
Diffstat (limited to 'bazel')
-rw-r--r--bazel/FuzzTargetTestWrapper.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/bazel/FuzzTargetTestWrapper.java b/bazel/FuzzTargetTestWrapper.java
index ef22ea0e..286bb86c 100644
--- a/bazel/FuzzTargetTestWrapper.java
+++ b/bazel/FuzzTargetTestWrapper.java
@@ -28,8 +28,24 @@ public class FuzzTargetTestWrapper {
Runfiles runfiles;
try {
runfiles = Runfiles.create();
- driverActualPath = runfiles.rlocation(args[0]);
+ String driverRlocation;
+ if (System.getProperty("os.name").startsWith("Windows")) {
+ driverRlocation = args[0] + ".exe";
+ } else {
+ driverRlocation = args[0];
+ }
+ driverActualPath = runfiles.rlocation(driverRlocation);
+ if (driverActualPath == null) {
+ System.err.println("driverActualPath is null, driverRlocation=" + driverRlocation);
+ System.exit(1);
+ return;
+ }
jarActualPath = runfiles.rlocation(args[1]);
+ if (jarActualPath == null) {
+ System.err.println("jarActualPath is null, jarRlocation=" + jarActualPath);
+ System.exit(1);
+ return;
+ }
} catch (IOException | ArrayIndexOutOfBoundsException e) {
e.printStackTrace();
System.exit(1);