diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/blogc-git-receiver/check_post_receive.sh.in | 2 | ||||
-rwxr-xr-x | tests/blogc-git-receiver/check_pre_receive.sh.in | 2 | ||||
-rwxr-xr-x | tests/blogc-git-receiver/check_shell.sh.in | 2 | ||||
-rwxr-xr-x | tests/blogc-make/check_blogc_make.sh.in | 16 | ||||
-rwxr-xr-x | tests/blogc/check_blogc.sh.in | 28 |
5 files changed, 26 insertions, 24 deletions
diff --git a/tests/blogc-git-receiver/check_post_receive.sh.in b/tests/blogc-git-receiver/check_post_receive.sh.in index 925ab31..9c6ded1 100755 --- a/tests/blogc-git-receiver/check_post_receive.sh.in +++ b/tests/blogc-git-receiver/check_post_receive.sh.in @@ -17,7 +17,7 @@ trap trap_func EXIT mkdir -p "${TEMP}/repos" git init --bare "${TEMP}/repos/foo.git" &> /dev/null -ln -s "${PWD}/blogc-git-receiver" "${TEMP}/repos/foo.git/hooks/post-receive" +ln -s "@abs_top_builddir@/blogc-git-receiver" "${TEMP}/repos/foo.git/hooks/post-receive" cat > "${TEMP}/tmp.txt" <<EOF blob diff --git a/tests/blogc-git-receiver/check_pre_receive.sh.in b/tests/blogc-git-receiver/check_pre_receive.sh.in index d70e04a..c2f57ac 100755 --- a/tests/blogc-git-receiver/check_pre_receive.sh.in +++ b/tests/blogc-git-receiver/check_pre_receive.sh.in @@ -17,7 +17,7 @@ trap trap_func EXIT mkdir -p "${TEMP}/repos" git init --bare "${TEMP}/repos/foo.git" &> /dev/null -SELF="${PWD}/blogc-git-receiver" +SELF="@abs_top_builddir@/blogc-git-receiver" ln -s "${SELF}" "${TEMP}/repos/foo.git/hooks/pre-receive" diff --git a/tests/blogc-git-receiver/check_shell.sh.in b/tests/blogc-git-receiver/check_shell.sh.in index 0099df3..1c84b8a 100755 --- a/tests/blogc-git-receiver/check_shell.sh.in +++ b/tests/blogc-git-receiver/check_shell.sh.in @@ -14,7 +14,7 @@ trap_func() { trap trap_func EXIT -SELF="${PWD}/blogc-git-receiver" +SELF="@abs_top_builddir@/blogc-git-receiver" call_bgr() { [[ -n "${VALGRIND}" ]] && export __VALGRIND_ENABLED=1 diff --git a/tests/blogc-make/check_blogc_make.sh.in b/tests/blogc-make/check_blogc_make.sh.in index 9993a22..b043049 100755 --- a/tests/blogc-make/check_blogc_make.sh.in +++ b/tests/blogc-make/check_blogc_make.sh.in @@ -4,6 +4,8 @@ set -xe -o pipefail export LC_ALL=C +export BLOGC=@abs_top_builddir@/blogc + TEMP="$(mktemp -d)" [[ -n "${TEMP}" ]] @@ -28,7 +30,7 @@ SITE_TAGLINE = WAT?! BASE_DOMAIN = http://example.org EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 ### default settings with some posts @@ -64,7 +66,7 @@ foo bar EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" grep "_build/index\\.html" "${TEMP}/output.txt" grep "_build/atom\\.xml" "${TEMP}/output.txt" grep "_build/page/1/index\\.html" "${TEMP}/output.txt" @@ -172,7 +174,7 @@ tag1 tag2 EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" grep "_build/index\\.html" "${TEMP}/output.txt" grep "_build/atom\\.xml" "${TEMP}/output.txt" grep "_build/atom/tag1\\.xml" "${TEMP}/output.txt" @@ -375,7 +377,7 @@ page1 page2 EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" grep "_build/index\\.html" "${TEMP}/output.txt" grep "_build/atom\\.xml" "${TEMP}/output.txt" grep "_build/atom/tag1\\.xml" "${TEMP}/output.txt" @@ -490,7 +492,7 @@ foo bar EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" grep "_blogc_build/posts\\.html" "${TEMP}/output.txt" grep "_blogc_build/atoom/index\\.xml" "${TEMP}/output.txt" grep "_blogc_build/pagination/1\\.html" "${TEMP}/output.txt" @@ -591,7 +593,7 @@ tag1 tag2 EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" grep "_blogc_build/posts\\.html" "${TEMP}/output.txt" grep "_blogc_build/atoom/index\\.xml" "${TEMP}/output.txt" grep "_blogc_build/atoom/tag1/index\\.xml" "${TEMP}/output.txt" @@ -737,7 +739,7 @@ page1 page2 EOF -${TESTS_ENVIRONMENT} ./blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc-make -f "${TEMP}/proj/blogcfile" 2>&1 | tee "${TEMP}/output.txt" grep "_blogc_build/posts\\.html" "${TEMP}/output.txt" grep "_blogc_build/atoom/index\\.xml" "${TEMP}/output.txt" grep "_blogc_build/atoom/tag1/index\\.xml" "${TEMP}/output.txt" diff --git a/tests/blogc/check_blogc.sh.in b/tests/blogc/check_blogc.sh.in index 7ea0c96..56d66e0 100755 --- a/tests/blogc/check_blogc.sh.in +++ b/tests/blogc/check_blogc.sh.in @@ -13,7 +13,7 @@ trap_func() { trap trap_func EXIT -${TESTS_ENVIRONMENT} ./blogc -v | grep blogc +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc -v | grep blogc cat > "${TEMP}/post1.txt" <<EOF TITLE: foo @@ -102,7 +102,7 @@ cat > "${TEMP}/expected-output.xml" <<EOF </feed> EOF -${TESTS_ENVIRONMENT} ./blogc \ +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D AUTHOR_NAME=Chunda \ @@ -116,7 +116,7 @@ ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output.xml" "${TEMP}/expected-output.xml" -echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} ./blogc \ +echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D AUTHOR_NAME=Chunda \ @@ -130,7 +130,7 @@ echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output2.xml" "${TEMP}/expected-output.xml" -${TESTS_ENVIRONMENT} ./blogc \ +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D AUTHOR_NAME=Chunda \ @@ -143,7 +143,7 @@ ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output3.xml" "${TEMP}/expected-output.xml" -echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} ./blogc \ +echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D AUTHOR_NAME=Chunda \ @@ -249,7 +249,7 @@ cat > "${TEMP}/expected-output.html" <<EOF </html> EOF -${TESTS_ENVIRONMENT} ./blogc \ +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -261,7 +261,7 @@ ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output.html" "${TEMP}/expected-output.html" -echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} ./blogc \ +echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -273,7 +273,7 @@ echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output2.html" "${TEMP}/expected-output.html" -${TESTS_ENVIRONMENT} ./blogc \ +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -284,7 +284,7 @@ ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output3.html" "${TEMP}/expected-output.html" -echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} ./blogc \ +echo -e "${TEMP}/post1.txt\n${TEMP}/post2.txt" | ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -328,7 +328,7 @@ cat > "${TEMP}/expected-output2.html" <<EOF </html> EOF -${TESTS_ENVIRONMENT} ./blogc \ +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -339,7 +339,7 @@ ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output5.html" "${TEMP}/expected-output2.html" -echo -e "${TEMP}/post1.txt" | ${TESTS_ENVIRONMENT} ./blogc \ +echo -e "${TEMP}/post1.txt" | ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -350,7 +350,7 @@ echo -e "${TEMP}/post1.txt" | ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output6.html" "${TEMP}/expected-output2.html" -${TESTS_ENVIRONMENT} ./blogc \ +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -360,7 +360,7 @@ ${TESTS_ENVIRONMENT} ./blogc \ diff -uN "${TEMP}/output7.html" "${TEMP}/expected-output2.html" -echo -e "${TEMP}/post1.txt" | ${TESTS_ENVIRONMENT} ./blogc \ +echo -e "${TEMP}/post1.txt" | ${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -D BASE_DOMAIN=http://bola.com/ \ -D BASE_URL= \ -D SITE_TITLE="Chunda's website" \ @@ -372,7 +372,7 @@ diff -uN "${TEMP}/output8.html" "${TEMP}/expected-output2.html" echo "{% block listig %}foo{% endblock %}\n" > "${TEMP}/error.tmpl" -${TESTS_ENVIRONMENT} ./blogc \ +${TESTS_ENVIRONMENT} @abs_top_builddir@/blogc \ -t "${TEMP}/error.tmpl" \ "${TEMP}/post1.txt" 2>&1 | tee "${TEMP}/output.txt" || true |