HBASE-20838 Include hbase-server in precommit test if CommonFSUtils is changed

This commit is contained in:
Yu Li 2018-07-12 10:14:36 +08:00
parent 368b1b1060
commit da39c6d397
2 changed files with 16 additions and 0 deletions

View File

@ -179,6 +179,18 @@ function personality_modules
if [ -n "${BUILD_ID}" ]; then
extra="${extra} -Dbuild.id=${BUILD_ID}"
fi
# If the set of changed files includes CommonFSUtils then add the hbase-server
# module to the set of modules (if not already included) to be tested
for f in "${CHANGED_FILES[@]}"
do
if [[ "${f}" =~ CommonFSUtils ]]; then
if [[ ! "${MODULES[*]}" =~ hbase-server ]] && [[ ! "${MODULES[*]}" =~ \. ]]; then
MODULES+=("hbase-server")
fi
break
fi
done
fi
for module in "${MODULES[@]}"; do

View File

@ -51,6 +51,10 @@ import org.apache.hbase.thirdparty.com.google.common.collect.Lists;
/**
* Utility methods for interacting with the underlying file system.
* <p/>
* Note that {@link #setStoragePolicy(FileSystem, Path, String)} is tested in TestFSUtils and
* pre-commit will run the hbase-server tests if there's code change in this class. See
* <a href="https://issues.apache.org/jira/browse/HBASE-20838">HBASE-20838</a> for more details.
*/
@InterfaceAudience.Private
public abstract class CommonFSUtils {