Page 1 of 1

Error running runtests.py

Posted: Wed Oct 22, 2014 9:20 pm
by abokhanc
Hi all,

When i issue: . runtests.py i get the following error:

Code: Select all

[stud2@feynman abinit-test]$ . runtests.py
-bash: This script executes the ABINIT suite of automatic tests.: command not found
import: unable to open X server `'.
import: unable to open X server `'.
import: unable to open X server `'.
-bash: from: command not found
-bash: from: command not found
-bash: from: command not found
-bash: from: command not found
-bash: /home/stud2/abinit-7.8.2-ser/share/abinit-test/runtests.py: line 20: syntax error near unexpected token `('
-bash: /home/stud2/abinit-7.8.2-ser/share/abinit-test/runtests.py: line 20: `pack_dir, x = os.path.split(absp(__file__))'


What am I missing? And how do i indicate which tests to run? I'm trying to run some of the libxc tests to see if it was compiled properly.

Thank you

Re: Error running runtests.py  [SOLVED]

Posted: Thu Oct 23, 2014 10:22 am
by pouillon
By typing ". runtests.py", you're asking the shell to read runtests.py and make the variable definitions it finds there available to your current session. Since runtests.py is a Python script, the shell cannot do anything but complain.

You probably want to run the following command instead:

Code: Select all

./runtests.py

Re: Error running runtests.py

Posted: Thu Oct 23, 2014 3:16 pm
by abokhanc
Thank you

I had to play around with the permissions, because it didn't let me run the script that way in a first place. But it all works now.