diff --git a/.travis.yml b/.travis.yml index b763532c..8d802a1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ python: script: - ./configure --production ./config/gfortran.cfg - source ./quantum_package.rc - - qp_module.py install Full_CI Hartree_Fock + - qp_module.py install Full_CI Hartree_Fock CAS_SD MRCC_CASSD - ninja - cd ocaml ; make ; cd - - - cd testing_no_regression ; ./unit_test.py + - cd test ; bats bats/qp.bats diff --git a/configure b/configure index 043f7454..317b9aa8 100755 --- a/configure +++ b/configure @@ -65,7 +65,8 @@ d_dependency = { "python": [], "ninja": ["gcc", "python"], "make": [], - "p_graphviz": ["python"] + "p_graphviz": ["python"], + "bats": [] } from collections import namedtuple @@ -135,10 +136,15 @@ p_graphviz = Info( description=' Python library for graphviz', default_path=join(QP_ROOT_INSTALL, "p_graphviz")) +bats = Info( + url='https://github.com/sstephenson/bats/archive/master.tar.gz', + description=' Bash Automated Testing System', + default_path=join(QP_ROOT_INSTALL, "bats")) + d_info = dict() for m in ["ocaml", "m4", "curl", "zlib", "path", "irpf90", "docopt", - "resultsFile", "ninja", "emsl", "ezfio", "p_graphviz"]: + "resultsFile", "ninja", "emsl", "ezfio", "p_graphviz",'bats']: exec ("d_info['{0}']={0}".format(m)) diff --git a/test/bats/qp.bats b/test/bats/qp.bats index 82194bf7..07c9b055 100644 --- a/test/bats/qp.bats +++ b/test/bats/qp.bats @@ -9,9 +9,11 @@ function eq() { awk -v n1=${1#-} -v n2=${2#-} -v p=$3 'BEGIN{ if ((n1-n2)^2 < p^2) exit 0; exit 1}' } -source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh +#: "${QP_ROOT?Pls set your quantum_package.rc}" +source ${QP_ROOT}/install/EZFIO/Bash/ezfio.sh TEST_DIR=${QP_ROOT}/test/work/ +mkdir -p ${TEST_DIR} cd ${TEST_DIR} @test "init HBO STO-3G" {