# # MoleCuilder - creates and alters molecular systems # Copyright (C) 2008-2012 University of Bonn # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # ### load session AT_SETUP([Standard Options - load session]) AT_KEYWORDS([options python load-session]) AT_TESTED([python diff grep]) AT_SKIP_IF([../../molecuilder --help --actionname load-session; if test $? -eq 5; then /bin/true; else /bin/false; fi]) # check that session is stored and can be executed when correctly prefixed file=test.py AT_CHECK([../../molecuilder --load-session ${abs_top_srcdir}/tests/regression/Options/Session/pre/$file --store-session $file --session-type "python"], 0, [ignore], [ignore]) AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Options/Session/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../runpython ./$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Standard Options - load complex session]) AT_KEYWORDS([options python load-session]) AT_TESTED([python diff grep]) AT_SKIP_IF([../../molecuilder --help --actionname load-session; if test $? -eq 5; then /bin/true; else /bin/false; fi]) # check that session is stored and can be executed when correctly prefixed file=complextest.py AT_CHECK([../../molecuilder --load-session ${abs_top_srcdir}/tests/regression/Options/Session/pre/$file --store-session $file --session-type "python"], 0, [ignore], [ignore]) AT_CHECK([diff $file ${abs_top_srcdir}/tests/regression/Options/Session/post/$file], 0, [ignore], [ignore]) AT_CHECK([../../runpython ./$file], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Standard Options - load complex session with waits]) AT_KEYWORDS([options load-session wait]) AT_TESTED([diff grep]) AT_SKIP_IF([../../molecuilder --help --actionname load-session; if test $? -eq 5; then /bin/true; else /bin/false; fi]) file=complexwait.py AT_CHECK([../../molecuilder --load-session ${abs_top_srcdir}/tests/regression/Options/Session/pre/$file], 0, [stdout], [ignore]) AT_CHECK([grep "Setting verbosity from 1 to 2." stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait1" stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait2" stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait3" stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait4" stdout], 0, [ignore], [ignore]) AT_CLEANUP AT_SETUP([Standard Options - run complex session with waits]) AT_KEYWORDS([options python wait]) AT_TESTED([python diff grep]) AT_SKIP_IF([../../molecuilder --help --actionname load-session; if test $? -eq 5; then /bin/true; else /bin/false; fi]) file=complexwait.py AT_CHECK([../../runpython ${abs_top_srcdir}/tests/regression/Options/Session/pre/$file], 0, [stdout], [ignore]) AT_CHECK([grep "Verbosity remains unchanged at 2" stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait1" stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait2" stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait3" stdout], 0, [ignore], [ignore]) AT_CHECK([grep "wait4" stdout], 0, [ignore], [ignore]) AT_CLEANUP