Cleanup for test.py
Remove validate.py from special files since it does not exist anymore Update comments Only remove ~/.fop once per test.py invocation and not for every build Change-Id: I7ea037ba6fe1f3132a454df6636ff701a1e39c13
This commit is contained in:
parent
8affa7cfed
commit
1c2d0b271c
@ -142,7 +142,6 @@ def error_message(error_log):
|
|||||||
return "\n".join(errs)
|
return "\n".join(errs)
|
||||||
|
|
||||||
|
|
||||||
# Check whether only files in www got updated
|
|
||||||
def only_www_touched():
|
def only_www_touched():
|
||||||
"""Check whether only files in www directory are touched"""
|
"""Check whether only files in www directory are touched"""
|
||||||
|
|
||||||
@ -164,7 +163,6 @@ def only_www_touched():
|
|||||||
return www_changed and not other_changed
|
return www_changed and not other_changed
|
||||||
|
|
||||||
|
|
||||||
# Check whether only files in www got updated
|
|
||||||
def ha_guide_touched():
|
def ha_guide_touched():
|
||||||
"""Check whether files in high-availability-guide directory are touched"""
|
"""Check whether files in high-availability-guide directory are touched"""
|
||||||
|
|
||||||
@ -200,7 +198,6 @@ def check_modified_affects_all(rootdir, verbose):
|
|||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
special_files = [
|
special_files = [
|
||||||
"tools/validate.py",
|
|
||||||
"tools/test.py",
|
"tools/test.py",
|
||||||
"doc/pom.xml"
|
"doc/pom.xml"
|
||||||
]
|
]
|
||||||
@ -431,13 +428,14 @@ def logging_build_book(result):
|
|||||||
def build_book(book):
|
def build_book(book):
|
||||||
"""Build book(s) in directory book"""
|
"""Build book(s) in directory book"""
|
||||||
|
|
||||||
|
# Note that we cannot build in parallel several books in the same
|
||||||
|
# directory like the Install Guide. Thus we build sequentially per
|
||||||
|
# directory.
|
||||||
os.chdir(book)
|
os.chdir(book)
|
||||||
result = True
|
result = True
|
||||||
returncode = 0
|
returncode = 0
|
||||||
base_book = os.path.basename(book)
|
base_book = os.path.basename(book)
|
||||||
try:
|
try:
|
||||||
shutil.rmtree(os.path.expanduser("~/.fop"),
|
|
||||||
ignore_errors=True)
|
|
||||||
# Clean first and then build so that the output of all guides
|
# Clean first and then build so that the output of all guides
|
||||||
# is available
|
# is available
|
||||||
output = subprocess.check_output(
|
output = subprocess.check_output(
|
||||||
@ -648,6 +646,11 @@ def build_affected_books(rootdir, book_exceptions,
|
|||||||
|
|
||||||
books = find_affected_books(rootdir, book_exceptions,
|
books = find_affected_books(rootdir, book_exceptions,
|
||||||
verbose, force)
|
verbose, force)
|
||||||
|
|
||||||
|
# Remove cache content which can cause build failures
|
||||||
|
shutil.rmtree(os.path.expanduser("~/.fop"),
|
||||||
|
ignore_errors=True)
|
||||||
|
|
||||||
maxjobs = multiprocessing.cpu_count()
|
maxjobs = multiprocessing.cpu_count()
|
||||||
# Jenkins fails sometimes with errors if too many jobs run, artificially
|
# Jenkins fails sometimes with errors if too many jobs run, artificially
|
||||||
# limit to 4 for now.
|
# limit to 4 for now.
|
||||||
|
Loading…
Reference in New Issue
Block a user