diff --git a/Documentation/doc/scripts/testsuite.py b/Documentation/doc/scripts/testsuite.py
index ffc64689fb6..6bdef902738 100755
--- a/Documentation/doc/scripts/testsuite.py
+++ b/Documentation/doc/scripts/testsuite.py
@@ -116,6 +116,7 @@ def main():
parser.add_argument('--publish', metavar='/path/to/publish', help='Specify this argument if the results should be published.')
parser.add_argument('--doc-log-dir', default='.', metavar='/path/to/cgal/build/dir/doc_log', help='The path of the documentation logs.')
parser.add_argument('--output-dir', default='.', metavar='/path/to/cgal/build/dir/doc_output', help='The path to the build documentation')
+ parser.add_argument('--diff', metavar='/path/to/diff', help='The path to the diff file.')
parser.add_argument('--cgal-version', help='Path to a version.h file from the current release. If not specified use git hash instead.')
parser.add_argument('--version-to-keep', help='indicates the number of release testsuites that should be kept at the publishing location.')
parser.add_argument('--do-copy-results', action="store_true", help='Specify this argument if you want to copy the generated documentation into the publishing location.')
@@ -135,7 +136,14 @@ def main():
title=d('#maintitle')
title.text(title.text() + ' for ' + version_string)
write_out_html(d, './index.html')
-
+
+ # does the diff exist ?
+ diff='n/a'
+ if args.diff:
+ diff_file=args.diff
+ if not os.path.isfile(diff_file):
+ sys.stderr.write('Diff file ' + diff_file + ' is not a file. Cannot diff.\n')
+ sys.exit(1)
if args.publish:
if args.publish.endswith('/'):
publish_dir=args.publish
@@ -156,6 +164,13 @@ def main():
with open(publish_dir + 'index.html') as f: pass
except IOError as e:
print('No index.html in the publish directory found. Writing a skeleton.')
+ shutil.copyfile(diff_file, publish_dir+'diff.txt')
+ with open(diff_file, 'r') as myfile:
+ diff=myfile.read()
+ if not diff:
+ diff='none'
+ else:
+ diff='See diff. '
with open(publish_dir + 'index.html', 'w') as f:
f.write('''