cbm-software / iron-tests

Collection of tests for OpenCMISS-iron
0 stars 6 forks source link

Cmgui images are not created #18

Closed maierbn closed 7 years ago

maierbn commented 7 years ago

The following images are not created on my local machine:

examples/example-0001-u/doc/figures/current_run_l2x1x1_n8x4x4_i1_s0.eps
examples/example-0001/doc/figures/current_run_l2x1x1_n8x4x4_i1_s0.eps
examples/example-0001/doc/figures/current_run_l2x1x0_n8x4x0_i1_s0.eps
examples/example-0004/doc/figures/current_run_l4x2x0_n8x4x0_i2_s0.eps
examples/example-0002/doc/figures/current_run_l2x1x1_n8x4x4_i1_s0.eps
examples/example-0001-u/doc/figures/current_run_l2x1x0_n8x4x0_i1_s0.eps
examples/example-0003/doc/figures/current_run_l2x1x0_n8x4x0_i1_s0.eps
examples/example-0011/doc/figures/current_run_l2x1x1_n8x4x4_i1_s0.eps
examples/example-0005/doc/figures/current_run_d2_i2_s0.eps
examples/example-0002/doc/figures/current_run_l2x1x0_n8x4x0_i1_s0.eps
examples/example-0011/doc/figures/current_run_l2x1x0_n8x4x0_i1_s0.eps
examples/example-0003/doc/figures/current_run_l2x1x1_n8x4x4_i1_s0.eps

The problem is in the create_figures.sh script:

#!/bin/bash

for cmguifile in `ls results/*.com`
do
    # run cmgui script file and export screenshot
    echo $cmguifile
    cmgui $cmguifile &
    sleep 1
    # close cmgui window by using PID of last command
    kill `echo $!`
done

Sleeping 1 second is too short, if I increase it to 10 seconds it works. But there should be a better way to terminate cmgui instead of KILLING it which is the worst you can do with a program.

maierbn commented 7 years ago

This was solved by simply adding an exit statement to the end of each *.com file.

beauof commented 7 years ago

Great! I had tried quit and close but not exit!

There was still a minor issue with some screenshots being empty. Addressed via commit 8557327.