Skip to content

Commit ee72c06

Browse files
committed
async-profiler 4.0 (Try fix tests in CI)
1 parent 673197d commit ee72c06

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

Formula/a/async-profiler.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ def install
2424
output = shell_output("#{bin}/asprof --version")
2525

2626
if build.head?
27-
assert_match(/^Async-profiler #{version}-#{Utils.git_head}.+/, output)
27+
assert_match /^Async-profiler #{version}-#{Utils.git_head}.+/, output
2828
else
29-
assert_match("Async-profiler #{version}", output)
29+
assert_match "Async-profiler #{version}", output
3030
end
3131

3232
(testpath/"Main.java").write <<~JAVA
@@ -37,8 +37,12 @@ def install
3737
}
3838
JAVA
3939

40-
pid = spawn Formula["openjdk"].bin/"java", testpath/"Main.java", "8"
40+
java_tmp = pipe_output("#{Formula["openjdk"].bin}/jshell -q -", "System.out.println(System.getProperty(\"java.io.tmpdir\"))")
41+
ohai java_tmp
42+
43+
pid = spawn Formula["openjdk"].bin/"java", "-XX:+StartAttachListener", testpath/"Main.java", "8"
4144
begin
45+
ohai shell_output("bash -c 'lsof -p #{pid}'")
4246
sleep 1
4347
system bin/"asprof",
4448
"-d", "2",

0 commit comments

Comments
 (0)