Skip to content

Commit c8f029a

Browse files
committed
fixing wiki script
1 parent ceb1eab commit c8f029a

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

travis-ci/check-wiki-examples.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,20 @@ def compile_and_check(examples):
3939
path = os.getcwd()
4040
errcnt = 0
4141
for exno, example in enumerate(examples):
42+
print('--', 'example', exno)
4243
try:
4344
# writing src to example.cpp
4445
t = tempfile.mkdtemp()
4546
with open(os.path.join(t, 'example.cpp'), 'w') as f:
4647
f.writelines(example['src'])
4748

4849
# executing commands from cmd
49-
print('--', 'compiling example', exno)
5050
os.chdir(t)
5151
with open(os.path.join(t, 'output.log'), 'w') as f:
5252
for cmd in example['cmd']:
53-
subprocess.call(cmd[2:].strip().split(' '), stderr=subprocess.STDOUT, stdout=f)
53+
cmd = cmd[2:].strip()
54+
print('--', 'calling', cmd)
55+
subprocess.call(cmd.split(' '), stderr=subprocess.STDOUT, stdout=f)
5456

5557
# comparing with out
5658
with open(os.path.join(t, 'output.log'), 'r') as f:

0 commit comments

Comments
 (0)