2 # Check that the -s and -S options are indeed doing
3 # what they are supposed to be doing.
4 # going to execute a pwd as soon as entering the test.
6 # Delete any files that may be left by mistake
8 # There should now be no coax2* files, except $top_srcdir/examples/coax2.bmp
9 rm -f $top_builddir/tmp/coax2.*
10 cp $top_srcdir/examples/coax2.bmp $top_builddir/tmp
12 # Check the -S and -s options together prevent all ( .bmp or .bin files ) being created.
13 if [ "$mpirun_found" = "yes" ] ; then
14 mpirun -np 2 $top_builddir/src/non_gui/atlc -s -S $top_builddir/tmp/coax2.bmp > /dev/null
16 $top_builddir/src/non_gui/atlc -s -S $top_builddir/tmp/coax2.bmp > /dev/null
19 if [ -f $top_builddir/tmp/coax2.Ex.bmp ] || [ -f $top_builddir/tmp/coax2.Ey.bin ] || [ -f top_builddir/tmp/coax2.Er.bin ] ; then
20 echo "FAILED:" $0 >> tests.log
24 # Delete any files created. There should be none.
27 # Check that -S suppresses the creation of .bin, but not .bmp's
28 if [ "$mpirun_found" = "yes" ] ; then
29 npirun -np 2$top_builddir/src/non_gui/atlc -S $top_builddir/tmp/coax2.bmp > /dev/null
31 $top_builddir/src/non_gui/atlc -S $top_builddir/tmp/coax2.bmp > /dev/null
34 if [ -f $top_builddir/tmp/coax2.Ex.bin ] || [ -f $top_builddir/tmp/coax2.Ey.bin ] || [ -f $top_builddir/tmp/coax2.Er.bin ] || [ ! -f $top_builddir/tmp/coax2.Er.bmp ] ; then
35 echo "FAILED:" $0 >> tests.log
39 rm -f $top_builddir/tmp/coax2.Ex.bmp
40 rm -f $top_builddir/tmp/coax2.Ey.bmp
41 rm -f $top_builddir/tmp/coax2.E.bmp
42 rm -f $top_builddir/tmp/coax2.U.bmp
43 rm -f $top_builddir/tmp/coax2.V.bmp
44 rm -f $top_builddir/tmp/coax2.Er.bmp
46 rm -f $top_builddir/tmp/coax2.Ex.bin
47 rm -f $top_builddir/tmp/coax2.Ey.bin
48 rm -f $top_builddir/tmp/coax2.E.bin
49 rm -f $top_builddir/tmp/coax2.U.bin
50 rm -f $top_builddir/tmp/coax2.V.bin
51 rm -f $top_builddir/tmp/coax2.Er.bin
53 # Check that no options creates.bmp's and bin's
55 # Check that -s suppresses the creation of .bmp's, but not .bin's
56 if [ "$mpirun_found" = "yes" ] ; then
57 mpirun -np 2 $top_builddir/src/non_gui/atlc -s $top_builddir/tmp/coax2.bmp > /dev/null
59 $top_builddir/src/non_gui/atlc -s $top_builddir/tmp/coax2.bmp > /dev/null
62 if [ -f $top_builddir/tmp/coax2.Ex.bmp ] || [ -f $top_builddir/tmp/coax2.Ey.bmp ] || [ ! -f $top_builddir/tmp/coax2.Er.bin ] ; then
63 echo "FAILED:" $0 >> tests.log
67 rm -f $top_builddir/tmp/coax2.Ex.bmp
68 rm -f $top_builddir/tmp/coax2.Ey.bmp
69 rm -f $top_builddir/tmp/coax2.E.bmp
70 rm -f $top_builddir/tmp/coax2.U.bmp
71 rm -f $top_builddir/tmp/coax2.V.bmp
72 rm -f $top_builddir/tmp/coax2.Er.bmp
74 rm -f $top_builddir/tmp/coax2.Ex.bin
75 rm -f $top_builddir/tmp/coax2.Ey.bin
76 rm -f $top_builddir/tmp/coax2.E.bin
77 rm -f $top_builddir/tmp/coax2.U.bin
78 rm -f $top_builddir/tmp/coax2.V.bin
79 rm -f $top_builddir/tmp/coax2.Er.bin
81 # Check that no options creates.bmp's and bin's
82 if [ "$mpirun_found" = "yes" ] ; then
83 $top_builddir/src/non_gui/atlc $top_builddir/tmp/coax2.bmp > /dev/null
85 $top_builddir/src/non_gui/atlc $top_builddir/tmp/coax2.bmp > /dev/null
88 if [ ! -f $top_builddir/tmp/coax2.Ex.bmp ] || [ ! -f $top_builddir/tmp/coax2.Ey.bmp ] || [ ! -f $top_builddir/tmp/coax2.Er.bin ] ; then
89 echo "FAILED:" $0 >> tests.log
92 rm $top_builddir/tmp/coax2.Ex.bin $top_builddir/tmp/coax2.Ey.bin
93 rm $top_builddir/tmp/coax2.E.bin $top_builddir/tmp/coax2.U.bin
94 rm $top_builddir/tmp/coax2.V.bin $top_builddir/tmp/coax2.Er.bin
95 rm $top_builddir/tmp/coax2.Ex.bmp $top_builddir/tmp/coax2.Ey.bmp
96 rm $top_builddir/tmp/coax2.E.bmp $top_builddir/tmp/coax2.U.bmp
97 rm $top_builddir/tmp/coax2.V.bmp $top_builddir/tmp/coax2.Er.bmp
98 rm -f $top_builddir/tmp/coax2.bmp
99 echo "PASSED:" $0 >> tests.log