Kouhei Sutou
null+****@clear*****
Mon May 1 18:52:55 JST 2017
Kouhei Sutou 2017-05-01 18:52:55 +0900 (Mon, 01 May 2017) New Revision: 8a5e4fe4165c7c35d90d59ef6f034d39cbdace1c https://github.com/pgroonga/pgroonga/commit/8a5e4fe4165c7c35d90d59ef6f034d39cbdace1c Message: Add a test script Added files: test/run-sql-test.sh Added: test/run-sql-test.sh (+44 -0) 100755 =================================================================== --- /dev/null +++ test/run-sql-test.sh 2017-05-01 18:52:55 +0900 (b6b78d8) @@ -0,0 +1,44 @@ +#!/bin/bash + +run() +{ + "$@" + if test $? -ne 0; then + echo "Failed $@" + exit 1 + fi +} + +set -x +test_names="" +while [ $# -gt 0 ]; do + arg="$1" + shift + case "${arg}" in + sql/*.sql) + test_name=$(echo "${arg}" | sed -e 's,^sql/\|\.sql,,g') + test_names="${test_names[@]} ${test_name}" + ;; + *) + if [ -d "${arg}" ]; then + for test_path in $(find ${arg} -name "*.sql"); do + test_name=$(echo "${test_path}" | sed -e 's,^sql/\|\.sql,,g') + test_names="${test_names[@]} ${test_name}" + done + else + test_names="${test_names[@]} ${arg}" + fi + ;; + esac +done + +DEBUG=1 HAVE_MSGPACK=1 run make -j$(nproc) > /dev/null +run make install > /dev/null +if [ -n "${test_names}" ]; then + make installcheck REGRESS="${test_names}" +else + make installcheck +fi +if [ $? != 0 ]; then + cat regression.diffs +fi -------------- next part -------------- HTML����������������������������... Download