Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
阿啄debugIT
transmittable-thread-local
提交
33ee9da7
T
transmittable-thread-local
项目概览
阿啄debugIT
/
transmittable-thread-local
与 Fork 源项目一致
从无法访问的项目Fork
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
transmittable-thread-local
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
33ee9da7
编写于
1月 24, 2020
作者:
oldratlee
🔥
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update scripts: test kotlin-support module
上级
3d99b109
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
67 addition
and
24 deletion
+67
-24
scripts/common.sh
scripts/common.sh
+42
-10
scripts/perf-test/memoryleak-ThreadLocal.sh
scripts/perf-test/memoryleak-ThreadLocal.sh
+1
-1
scripts/perf-test/memoryleak-TransmittableThreadLocal.sh
scripts/perf-test/memoryleak-TransmittableThreadLocal.sh
+1
-1
scripts/perf-test/tps-ThreadLocal.sh
scripts/perf-test/tps-ThreadLocal.sh
+1
-1
scripts/perf-test/tps-TransmittableThreadLocal.sh
scripts/perf-test/tps-TransmittableThreadLocal.sh
+1
-1
scripts/run-agent-demo.sh
scripts/run-agent-demo.sh
+1
-1
scripts/run-agent-for-class.sh
scripts/run-agent-for-class.sh
+1
-1
scripts/run-agent-test.sh
scripts/run-agent-test.sh
+12
-6
scripts/run-junit.sh
scripts/run-junit.sh
+7
-2
未找到文件。
scripts/common.sh
浏览文件 @
33ee9da7
...
@@ -130,26 +130,41 @@ mvnCompileTest() {
...
@@ -130,26 +130,41 @@ mvnCompileTest() {
fi
fi
}
}
readonly
dependencies_dir
=
"library/target/dependency"
readonly
core_module_dependencies_dir
=
"library/target/dependency"
readonly
kotlin_support_module_dependencies_dir
=
"kotlin-support/target/dependency"
mvnCopyDependencies
()
{
mvnCopyDependencies
()
{
if
[
!
-e
"
$dependencies_dir
"
]
;
then
if
[
!
-e
"
$
core_module_
dependencies_dir
"
]
;
then
# https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
# https://maven.apache.org/plugins/maven-dependency-plugin/copy-dependencies-mojo.html
# exclude repackaged and shaded javassist libs
# exclude repackaged and shaded javassist libs
runCmd
"
${
MVN_CMD
[@]
}
"
dependency:copy-dependencies
-DincludeScope
=
test
-DexcludeArtifactIds
=
javassist,jsr305,spotbugs-annotations
||
die
"fail to mvn copy-dependencies!"
runCmd
"
${
MVN_CMD
[@]
}
"
dependency:copy-dependencies
-DincludeScope
=
test
\
-DexcludeArtifactIds
=
javassist,jsr305,spotbugs-annotations,transmittable-thread-local
\
||
die
"fail to mvn copy-dependencies!"
fi
fi
}
}
getClasspathOfDependencies
()
{
getC
oreModuleC
lasspathOfDependencies
()
{
mvnCopyDependencies 1>&2
mvnCopyDependencies 1>&2
echo
"
$dependencies_dir
"
/
*
.jar |
tr
' '
:
echo
"
$
core_module_
dependencies_dir
"
/
*
.jar |
tr
' '
:
}
}
getClasspathWithoutTtlJar
()
{
getKotlinSupportModuleClasspathOfDependencies
()
{
mvnCopyDependencies 1>&2
echo
"
$kotlin_support_module_dependencies_dir
"
/
*
.jar |
tr
' '
:
}
getCoreModuleClasspathWithoutTtlJar
()
{
mvnCompileTest 1>&2
mvnCompileTest 1>&2
echo
"library/target/test-classes:
$(
getClasspathOfDependencies
)
"
echo
"library/target/test-classes:
$(
getCoreModuleClasspathOfDependencies
)
"
}
getKotlinSupportModuleClasspathWithoutTtlJar
()
{
mvnCompileTest 1>&2
echo
"kotlin-support/target/test-classes:library/target/test-classes:
$(
getCoreModuleClasspathOfDependencies
)
"
}
}
getTtlJarPath
()
{
getTtlJarPath
()
{
...
@@ -158,11 +173,15 @@ getTtlJarPath() {
...
@@ -158,11 +173,15 @@ getTtlJarPath() {
echo
"
$ttl_jar
"
echo
"
$ttl_jar
"
}
}
getClasspath
()
{
getC
oreModuleC
lasspath
()
{
echo
"
$(
getTtlJarPath
)
:
$(
getClasspathWithoutTtlJar
)
"
echo
"
$(
getTtlJarPath
)
:
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
}
}
getJUnitTestCases
()
{
getKotlinSupportModuleClasspath
()
{
echo
"
$(
getTtlJarPath
)
:
$(
getKotlinSupportModuleClasspathWithoutTtlJar
)
"
}
getCoreModuleJUnitTestCases
()
{
(
(
mvnCompileTest 1>&2
mvnCompileTest 1>&2
...
@@ -175,6 +194,19 @@ getJUnitTestCases() {
...
@@ -175,6 +194,19 @@ getJUnitTestCases() {
)
)
}
}
getKotlinSupportModuleJUnitTestCases
()
{
(
mvnCompileTest 1>&2
cd
kotlin-support/target/test-classes
&&
find
.
-iname
'*Test.class'
|
sed
'
s%^\./%%
s/\.class$//
s%/%.%g
'
)
}
#################################################################################
#################################################################################
# maven actions
# maven actions
#################################################################################
#################################################################################
...
...
scripts/perf-test/memoryleak-ThreadLocal.sh
浏览文件 @
33ee9da7
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
source
../common.sh
source
../common.sh
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
com.alibaba.perf.memoryleak.NoMemoryLeak_ThreadLocal_NoRemove
com.alibaba.perf.memoryleak.NoMemoryLeak_ThreadLocal_NoRemove
scripts/perf-test/memoryleak-TransmittableThreadLocal.sh
浏览文件 @
33ee9da7
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
source
../common.sh
source
../common.sh
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspath
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspath
)
"
\
com.alibaba.perf.memoryleak.NoMemoryLeak_TransmittableThreadLocal_NoRemove
com.alibaba.perf.memoryleak.NoMemoryLeak_TransmittableThreadLocal_NoRemove
scripts/perf-test/tps-ThreadLocal.sh
浏览文件 @
33ee9da7
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
source
../common.sh
source
../common.sh
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
com.alibaba.perf.tps.CreateThreadLocalInstanceTps
com.alibaba.perf.tps.CreateThreadLocalInstanceTps
scripts/perf-test/tps-TransmittableThreadLocal.sh
浏览文件 @
33ee9da7
...
@@ -3,5 +3,5 @@
...
@@ -3,5 +3,5 @@
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
source
../common.sh
source
../common.sh
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspath
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspath
)
"
\
com.alibaba.perf.tps.CreateTransmittableThreadLocalInstanceTps
com.alibaba.perf.tps.CreateTransmittableThreadLocalInstanceTps
scripts/run-agent-demo.sh
浏览文件 @
33ee9da7
...
@@ -3,6 +3,6 @@
...
@@ -3,6 +3,6 @@
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
source
./common.sh
source
./common.sh
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
com.alibaba.demo.ttl.agent.AgentDemo
com.alibaba.demo.ttl.agent.AgentDemo
scripts/run-agent-for-class.sh
浏览文件 @
33ee9da7
...
@@ -7,6 +7,6 @@ shift 1
...
@@ -7,6 +7,6 @@ shift 1
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
cd
"
$(
dirname
"
$(
readlink
-f
"
$0
"
)
"
)
"
source
./common.sh
source
./common.sh
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
"
$run_class_name
"
"
$run_class_name
"
scripts/run-agent-test.sh
浏览文件 @
33ee9da7
...
@@ -9,24 +9,30 @@ source ./common.sh
...
@@ -9,24 +9,30 @@ source ./common.sh
runCmd mvnBuildJar
runCmd mvnBuildJar
blueEcho
"Run unit test under ttl agent, include check for ExecutorService, ForkJoinPool"
blueEcho
"Run unit test under ttl agent, include check for ExecutorService, ForkJoinPool"
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
-Drun-ttl-test-under-agent
=
true
\
-Drun-ttl-test-under-agent
=
true
\
org.junit.runner.JUnitCore
$(
getJUnitTestCases
)
org.junit.runner.JUnitCore
$(
get
CoreModule
JUnitTestCases
)
blueEcho
"Run unit test under ttl agent, and turn on the disable inheritable for thread pool enhancement"
blueEcho
"Run unit test under ttl agent, and turn on the disable inheritable for thread pool enhancement"
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT,ttl.agent.disable.inheritable.for.thread.pool:true"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT,ttl.agent.disable.inheritable.for.thread.pool:true"
\
-Drun-ttl-test-under-agent
=
true
\
-Drun-ttl-test-under-agent
=
true
\
-Drun-ttl-test-under-agent-with-disable-inheritable
=
true
\
-Drun-ttl-test-under-agent-with-disable-inheritable
=
true
\
org.junit.runner.JUnitCore
$(
getJUnitTestCases
)
org.junit.runner.JUnitCore
$(
get
CoreModule
JUnitTestCases
)
blueEcho
'Run agent check for Timer/TimerTask, default "ttl.agent.enable.timer.task"'
blueEcho
'Run agent check for Timer/TimerTask, default "ttl.agent.enable.timer.task"'
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
com.alibaba.ttl.threadpool.agent.check.timer.TimerAgentCheck
com.alibaba.ttl.threadpool.agent.check.timer.TimerAgentCheck
blueEcho
"Run agent check for Timer/TimerTask, explicit "
ttl.agent.enable.timer.task
""
blueEcho
"Run agent check for Timer/TimerTask, explicit "
ttl.agent.enable.timer.task
""
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspathWithoutTtlJar
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getC
oreModuleC
lasspathWithoutTtlJar
)
"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT,ttl.agent.enable.timer.task:true"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT,ttl.agent.enable.timer.task:true"
\
com.alibaba.ttl.threadpool.agent.check.timer.TimerAgentCheck
com.alibaba.ttl.threadpool.agent.check.timer.TimerAgentCheck
blueEcho
"Run unit test under ttl agent, check for Koroutine"
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getKotlinSupportModuleClasspathWithoutTtlJar
)
"
\
"-javaagent:
$(
getTtlJarPath
)
=ttl.agent.logger:STDOUT"
\
-Drun-ttl-test-under-agent
=
true
\
org.junit.runner.JUnitCore
$(
getKotlinSupportModuleJUnitTestCases
)
scripts/run-junit.sh
浏览文件 @
33ee9da7
...
@@ -5,6 +5,11 @@ cd "$(dirname "$(readlink -f "$0")")"
...
@@ -5,6 +5,11 @@ cd "$(dirname "$(readlink -f "$0")")"
export
TTL_CI_TEST_MODE
=
true
export
TTL_CI_TEST_MODE
=
true
source
./common.sh
source
./common.sh
# run junit test for core module
# skip unit test for Javassist on command line, because Javassist is repackaged.
# skip unit test for Javassist on command line, because Javassist is repackaged.
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getClasspath
)
"
\
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getCoreModuleClasspath
)
"
\
org.junit.runner.JUnitCore
$(
getJUnitTestCases |
grep
-vE
'\.JavassistTest$'
)
org.junit.runner.JUnitCore
$(
getCoreModuleJUnitTestCases |
grep
-vE
'\.JavassistTest$'
)
# run junit test for kotlin-support module
runCmd
"
${
JAVA_CMD
[@]
}
"
-cp
"
$(
getKotlinSupportModuleClasspath
)
"
\
org.junit.runner.JUnitCore
$(
getKotlinSupportModuleJUnitTestCases
)
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录