Skip to content

Commit 1573bec

Browse files
committed
Added new compile_type when compiling specific libraries.
Fixes created reports after the compiles.
1 parent 49b2b5a commit 1573bec

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

codebender_testing/disqus.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def update_comment(self, sketch, results, current_date, log_entry, openFailFlag,
7171
self.last_library = library
7272

7373
library_to_comment = None
74-
if library and library not in self.examples_without_library and library != self.last_library:
74+
if self.last_library and self.last_library not in self.examples_without_library and library != self.last_library:
7575
library_to_comment = self.last_library
7676
if library and library not in self.examples_without_library and counter >= total_sketches-1:
7777
library_to_comment = library

codebender_testing/utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,8 @@ def report_creator(compile_type, log_entry, log_file):
130130
logs_re = re.compile(r'.+libraries_test.+')
131131
elif compile_type == 'fetch':
132132
logs_re = re.compile(r'.+libraries_fetch.+')
133+
elif compile_type == 'target_library':
134+
logs_re = re.compile(r'.+target_libraries.+')
133135

134136
logs = sorted([x for x in logs if x != '.gitignore' and logs_re.match(x)])
135137
tail = logs[-2:]
@@ -628,7 +630,7 @@ def compile_sketches(self, sketches, iframe=False, project_view=False, logfile=N
628630
test_status = 'U'
629631

630632
# Update Disqus comments
631-
if compile_type == 'library' and comment:
633+
if compile_type in ['library', 'target_library'] and comment:
632634
log_entry = disqus_wrapper.update_comment(sketch, results, current_date, log_entry, openFailFlag, counter, total_sketches)
633635

634636
# Dump the test results to `logfile`.

tests/target_libraries/test_target_libraries.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def test_compile_target_libraries(self):
4646
if len(urls_to_follow) > 0:
4747
"""Tests that specific library examples compile successfully."""
4848
self.compile_sketches(urls_to_follow,
49-
compile_type='library',
49+
compile_type='target_library',
5050
iframe=False, project_view=True,
5151
create_report=True, logfile=LOG_FILE,
5252
comment=True)

0 commit comments

Comments
 (0)