autorun_post: collect a single instance of doc
Put a copy of the generated Doxygen documentation output into the top-level build directory so it can be linked from the build result template. Change-Id: Ied8ac9f6298b28ed4d991774b1396960498bd04c Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com> Reviewed-on: https://review.gerrithub.io/382890 Tested-by: SPDK Automated Test System <sys_sgsw@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Seth Howell <seth.howell5141@gmail.com>
This commit is contained in:
parent
2b37c71be1
commit
9aa4bc7010
@ -1,12 +1,13 @@
|
||||
#! /usr/bin/python3
|
||||
|
||||
import shutil
|
||||
import subprocess
|
||||
import argparse
|
||||
import os
|
||||
import glob
|
||||
import re
|
||||
|
||||
def main(output_dir, repo_dir):
|
||||
def generateCoverageReport(output_dir, repo_dir):
|
||||
with open(os.path.join(output_dir, 'coverage.log'), 'w+') as log_file:
|
||||
coveragePath = os.path.join(output_dir, '**', 'cov_total.info')
|
||||
covfiles = glob.glob(coveragePath, recursive=True)
|
||||
@ -48,6 +49,24 @@ def main(output_dir, repo_dir):
|
||||
print(e, file=log_file)
|
||||
|
||||
|
||||
def prepDocumentation(output_dir, repo_dir):
|
||||
# Find one instance of 'doc' output directory and move it to the top level
|
||||
docDirs = glob.glob(os.path.join(output_dir, '*', 'doc'))
|
||||
docDirs.sort()
|
||||
if len(docDirs) == 0:
|
||||
return
|
||||
|
||||
print("docDirs: ", docDirs)
|
||||
docDir = docDirs[0]
|
||||
print("docDir: ", docDir)
|
||||
shutil.move(docDir, os.path.join(output_dir, 'doc'))
|
||||
|
||||
|
||||
def main(output_dir, repo_dir):
|
||||
generateCoverageReport(output_dir, repo_dir)
|
||||
prepDocumentation(output_dir, repo_dir)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="SPDK Coverage Processor")
|
||||
parser.add_argument("-d", "--directory_location", type=str, required=True,
|
||||
|
Loading…
Reference in New Issue
Block a user