You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@yetus.apache.org by "Casey Brotherton (JIRA)" <ji...@apache.org> on 2016/11/08 16:16:58 UTC
[jira] [Updated] (YETUS-464) test-patch silently continues when
USER_PLUGIN_DIR doesn't exist
[ https://issues.apache.org/jira/browse/YETUS-464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Casey Brotherton updated YETUS-464:
-----------------------------------
Attachment: YETUS-464.002.patch
I tested the parameters, made sure the patch was up to date, changed the messages to yetus_error when
appropriate.
Some Notes regarding the changes:
1) in java.sh, if JAVA_HOME is not a directory, I included the same
action as when JAVA_HOME is not set.
( delete_test javac and javadoc, and return 1 )
This triggers a cleanup_and_exit from plugins_initialize.
-- Not sure if this is the intended behaviour as there is a delete_test
when an exit could have been triggered with return 1.
2) Changed the USER_PLUGIN_DIR to use "ls" instead of built in globbing,
because if a mistake is made and the directory does not contain plugin scripts,
then ${USER_PLUGIN_DIR}/*.sh can be added as an additional file
3) ENABLED_PLUGINS was set to over-ride a new entry on command line, but
would ignore a new one from a personality.
-- This seems inconsistent. I have not changed this, but did log when either happens at yetus_debug.
> test-patch silently continues when USER_PLUGIN_DIR doesn't exist
> ----------------------------------------------------------------
>
> Key: YETUS-464
> URL: https://issues.apache.org/jira/browse/YETUS-464
> Project: Yetus
> Issue Type: Bug
> Components: Test Patch
> Affects Versions: 0.4.0
> Reporter: Casey Brotherton
> Assignee: Casey Brotherton
> Priority: Minor
> Attachments: YETUS-464.001.patch, YETUS-464.002.patch
>
>
> If one specifies a directory that does not exist in the --user-plugins argument, test-patch.sh will quietly ignore the directory.
> This was found when using a tilde ( ~ ) to attempt home directory expansion
> when testing a new plugin.
> Bash does not expand tilde's at the beginning of the line when quoted.
> Thoughts on resolving this:
> 1) Should warn in the argument section in 01-common.sh if the directory does not exist. ( Not only for USER_PLUGIN_DIR butt for any of the other directories. )
> 2) It might be possible to change yetus_abs to handle tilde expansion, and then use that code to expand the parameter. Of note is that yetus_abs is used to expand USER_PLUGIN_DIR in test-patch.sh
> 3) If there are changes with the argument handling, it should be considered to check with the arguments to ensure that they are not being overwritten. ( This would only happen with user error, but makes debugging and understanding more difficult. )
> I will pull together a patch for #1, and reflect on #2/#3 further. Any comments, please add them to the Jira.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)