You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2021/03/24 08:46:56 UTC

[GitHub] [skywalking] nisiyong commented on a change in pull request #6003: Checkstyle plugin checks test codes

nisiyong commented on a change in pull request #6003:
URL: https://github.com/apache/skywalking/pull/6003#discussion_r600277101



##########
File path: test/plugin/run.sh
##########
@@ -140,11 +140,19 @@ if [[ ! -d ${agent_home} ]]; then
     echo "[WARN] SkyWalking Agent not exists"
     ${mvnw} --batch-mode -f ${home}/../../pom.xml -Pagent -DskipTests clean package
 fi
+# if it fails last time, relevant information will be deleted
+sed -i '/<sourceDirectory>scenarios\/'"$scenario_name"'<\/sourceDirectory>/d' ./pom.xml
+# add scenario_name into plugin/pom.xml
+echo check code with the checkstyle-plugin
+sed -i '/<\/sourceDirectories>/i <sourceDirectory>scenarios\/'"$scenario_name"'<\/sourceDirectory>' ./pom.xml
+

Review comment:
       I check out the newest code, 8.5.0-SNAPSHOT.
   Run this script failed in my MacBook. How to fix it?
   ref: [local-test-and-pull-request-to-the-upstream](https://github.com/apache/skywalking/blob/master/docs/en/guides/Plugin-test.md#local-test-and-pull-request-to-the-upstream)
   
   ```bash
   ➜  skywalking git:(master) bash ./test/plugin/run.sh hbase-scenario
   +++ dirname ./test/plugin/run.sh
   ++ cd ./test/plugin
   ++ pwd
   + home=/Users/nisiyong/CodeProjects/skywalking/test/plugin
   + scenario_name=
   + force_build=off
   + cleanup=off
   + debug_mode=
   + mvnw=/Users/nisiyong/CodeProjects/skywalking/test/plugin/../../mvnw
   + agent_home=/Users/nisiyong/CodeProjects/skywalking/test/plugin/../../skywalking-agent
   + jacoco_home=/Users/nisiyong/CodeProjects/skywalking/test/plugin/../jacoco
   + scenarios_home=/Users/nisiyong/CodeProjects/skywalking/test/plugin/scenarios
   + num_of_testcases=
   + image_version=jdk8-1.0.0
   ++ date +%s
   + start_stamp=1616572417
   + parse_commandline hbase-scenario
   + test 1 -gt 0
   + _key=hbase-scenario
   + case "$_key" in
   + scenario_name=hbase-scenario
   + shift
   + test 0 -gt 0
   + [[ off == \o\n ]]
   + test -z hbase-scenario
   + [[ ! -d /Users/nisiyong/CodeProjects/skywalking/test/plugin/../../skywalking-agent ]]
   + sed -i '/<sourceDirectory>scenarios\/hbase-scenario<\/sourceDirectory>/d' ./pom.xml
   sed: 1: "./pom.xml": invalid command code .
   ```




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org