summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Monteith <stuart.monteith@linaro.org>2016-11-03 11:09:50 +0000
committerStuart Monteith <stuart.monteith@linaro.org>2016-11-03 11:12:47 +0000
commit3230ac2c00331d6c08b4c4d3be36e955de5ce4e4 (patch)
tree35c69e1b67d21af82edb323bf8ecd5f6d1d5f6e3
parent9a18f079a8a1937bac19befce888fd77a76ca35a (diff)
Accept subdirectory for html links
Fix issue where generated html ignores subdirectory the results are placed under. Currently missing jdk8u/...
-rwxr-xr-xjcstress-generate-html-report.py3
-rwxr-xr-xjcstress-publish2
2 files changed, 3 insertions, 2 deletions
diff --git a/jcstress-generate-html-report.py b/jcstress-generate-html-report.py
index e006366..a5c09b4 100755
--- a/jcstress-generate-html-report.py
+++ b/jcstress-generate-html-report.py
@@ -33,6 +33,7 @@ def remove_starting_path(full_path, start):
parser = argparse.ArgumentParser()
parser.add_argument('--results', help='results filename', type=str, required=True)
parser.add_argument('--top-dir', help="top directory", type=str, required=True)
+parser.add_argument('sub_dir', help="html subdirectory", type=str)
args = parser.parse_args()
head = HEAD(TITLE("jcstress Result Archive ({})".format(platform.machine())))
@@ -53,7 +54,7 @@ with open(args.results, 'rb') as csvfile:
pass_fail = pass_fail_rate("{}/results/index.html".format(row[1]))
human_readable_date = time.strftime("%Y-%m-%d", time.localtime(int(row[0]))).lower()
html_row <= TD(human_readable_date)
- index_html = os.path.join(os.path.sep, remove_starting_path(row[1], args.top_dir), 'results', 'index.html')
+ index_html = os.path.join(args.sub_dir, os.path.sep, remove_starting_path(row[1], args.top_dir), 'results', 'index.html')
html_row <= TD(A("{}/{}".format(pass_fail[0], pass_fail[1]), href=index_html), align='right')
table <= html_row
diff --git a/jcstress-publish b/jcstress-publish
index a7d2ec6..e6efdfe 100755
--- a/jcstress-publish
+++ b/jcstress-publish
@@ -39,7 +39,7 @@ rsync ${RSYNC_DRY_RUN:=} -h -am --del --include='*.html' -f 'hide,! */' $JCSTRES
# Create index
index_html=$(mktemp /tmp/${progname}-XXXXXX.$$.html)
trap "rm -f $index_html" EXIT
-$THISDIR/jcstress-generate-html-report > $index_html
+$THISDIR/jcstress-generate-html-report ${JDK_VERSION}> $index_html
chmod 644 $index_html
scp $index_html ${PUBLISH_HOST}:$d/index.html
scp $THISDIR/*.css ${PUBLISH_HOST}:$d