Author: bugman Date: Sat Sep 30 16:07:51 2006 New Revision: 2590 URL: http://svn.gna.org/viewcvs/relax?rev=2590&view=rev Log: Added tests for the Dasha, Molmol, Grace, and OpenDX executables. This is an extension of the ideas introduced to fix bug #7225 (https://gna.org/bugs/?7225). This change was discussed at https://mail.gna.org/public/relax-devel/2006-09/msg00034.html (Message-id: <7f080ed10609280917s139d2c2cm9f0edcbd5a9fc04c@xxxxxxxxxxxxxx>). Modified: 1.2/dx/opendx.py 1.2/generic_fns/dasha.py 1.2/generic_fns/grace.py 1.2/generic_fns/molmol.py Modified: 1.2/dx/opendx.py URL: http://svn.gna.org/viewcvs/relax/1.2/dx/opendx.py?rev=2590&r1=2589&r2=2590&view=diff ============================================================================== --- 1.2/dx/opendx.py (original) +++ 1.2/dx/opendx.py Sat Sep 30 16:07:51 2006 @@ -74,5 +74,8 @@ if vp_exec: execute_text = " -execute" + # Test the binary file string corresponds to a valid executable. + self.relax.IO.test_binary(dx_exe) + # Run OpenDX. system(dx_exe + dir_text + " -program " + file + ".net" + execute_text + " &") Modified: 1.2/generic_fns/dasha.py URL: http://svn.gna.org/viewcvs/relax/1.2/generic_fns/dasha.py?rev=2590&r1=2589&r2=2590&view=diff ============================================================================== --- 1.2/generic_fns/dasha.py (original) +++ 1.2/generic_fns/dasha.py Sat Sep 30 16:07:51 2006 @@ -338,6 +338,9 @@ self.force = force self.binary = binary + # Test the binary file string corresponds to a valid executable. + self.relax.IO.test_binary(self.binary) + # The current directory. orig_dir = getcwd() Modified: 1.2/generic_fns/grace.py URL: http://svn.gna.org/viewcvs/relax/1.2/generic_fns/grace.py?rev=2590&r1=2589&r2=2590&view=diff ============================================================================== --- 1.2/generic_fns/grace.py (original) +++ 1.2/generic_fns/grace.py Sat Sep 30 16:07:51 2006 @@ -161,6 +161,9 @@ def view(self, file=None, dir=None, grace_exe='xmgrace'): """Function for running Grace.""" + # Test the binary file string corresponds to a valid executable. + self.relax.IO.test_binary(grace_exe) + # File path. self.file_path = self.relax.IO.file_path(file, dir) Modified: 1.2/generic_fns/molmol.py URL: http://svn.gna.org/viewcvs/relax/1.2/generic_fns/molmol.py?rev=2590&r1=2589&r2=2590&view=diff ============================================================================== --- 1.2/generic_fns/molmol.py (original) +++ 1.2/generic_fns/molmol.py Sat Sep 30 16:07:51 2006 @@ -100,6 +100,9 @@ def pipe_open(self): """Function for opening a Molmol pipe.""" + # Test that the Molmol binary exists. + self.relax.IO.test_binary('molmol') + # Open the Molmol pipe. self.relax.data.molmol = popen("molmol -f -", 'w', 0)