gala-gopher/bugfix-fix-java_probe_test-find-jdk-path.patch
xietangxin 8711211d06 bugfix:fix testcase compile and run errs
(cherry picked from commit db0c5683e769ee99e88b1cd83c48d8ab79ac124e)
2023-02-25 23:50:03 +08:00

46 lines
1.3 KiB
Diff

From fafbabcd1be7405d4711aa761eff4413c36d8744 Mon Sep 17 00:00:00 2001
From: xietangxin <xietangxin@huawei.com>
Date: Thu, 23 Feb 2023 14:20:53 +0800
Subject: [PATCH] bugfix: fix java_probe_test find jdk path
---
.../java_probe/java_probes_test.sh | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/test/test_extend_probes/java_probe/java_probes_test.sh b/test/test_extend_probes/java_probe/java_probes_test.sh
index 9fe4e0e..043e9ce 100644
--- a/test/test_extend_probes/java_probe/java_probes_test.sh
+++ b/test/test_extend_probes/java_probe/java_probes_test.sh
@@ -6,7 +6,7 @@ function find_jars()
then
# find jdk
clink_path=$(echo $(ls -lrt $javac_link) | awk -F " " '{print $NF}' )
- link_path=$(echo $(ls -lrt $link_path) | awk -F " " '{print $NF}' )
+ link_path=$(echo $(ls -lrt $clink_path) | awk -F " " '{print $NF}' )
jdk_path=$(dirname $(dirname $link_path))
dir=$jdk_path
else
@@ -32,19 +32,6 @@ function find_jars()
return 1
fi
- #find rpm
- junit_rpm=$( rpm -qa junit )
- if [ -z $junit_rpm ];
- then
- #install junit4
- yum install junit
- junit_rpm=$( rpm -qa junit )
- if [ -z $junit_rpm ];
- then
- exit 1
- fi
- fi
-
#junit.jar
junit_jar=$( rpm -ql junit | grep junit.jar)
if [ -e $junit_jar ];
--
2.33.0