Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Make sure the regression tests are properly setup
Baptiste Daroussin committed 11 years ago
commit e994d7194678ce24a54e50ec6d0649177afed420
parent c94b683bfd19cae41434347a67010320d35a2ed9
3 files changed +38 -0
modified tests/Makefile.am
@@ -66,6 +66,7 @@ EXTRA_DIST= frontend/png.uclin \
		frontend/sqlite3.uclin \
		Kyuafile \
		frontend/Kyuafile \
+
		frontend/001sanity.shin \
		frontend/add.shin \
		frontend/alias.shin \
		frontend/annotate.shin \
@@ -93,6 +94,7 @@ EXTRA_PROGRAMS= $(tests_programs)
check_PROGRAMS=	$(tests_programs)
check_SCRIPTS=	frontend/pkg.sh \
		frontend/add.sh \
+
		frontend/001sanity.sh \
		frontend/alias.sh \
		frontend/annotate.sh \
		frontend/conflicts.sh \
added tests/frontend/001sanity.shin
@@ -0,0 +1,35 @@
+
#!/usr/bin/env atf-sh
+

+
atf_test_case which
+
which_head() {
+
	atf_set "descr" "test the sanity of the tested pkg location"
+
}
+

+
which_body() {
+
	atf_check \
+
	    -o inline:"$(atf_get_srcdir)/../../src/pkg\n" \
+
	    -e empty \
+
	    -s exit:0 \
+
	    which pkg
+
}
+

+
atf_test_case ldd
+
ldd_head() {
+
	atf_set "descr" "test the sanity of the ldd output"
+
}
+

+
ldd_body() {
+
	atf_check \
+
	    -o match:".*libpkg.so.3 => /home/bapt/dev/pkg/tests/frontend/.*$" \
+
	    -e empty \
+
	    -s exit:0 \
+
	    ldd -a $(atf_get_srcdir)/../../src/.libs/pkg
+
}
+
atf_init_test_cases() {
+
	. $(atf_get_srcdir)/test_environment.sh
+

+
	atf_add_test_case which
+
	if [ `uname -s` != "Darwin" ]; then
+
		atf_add_test_case ldd
+
	fi
+
}
modified tests/frontend/Kyuafile
@@ -2,6 +2,7 @@ syntax('kyuafile', 1)

test_suite('prop: test-suite = frontend')

+
atf_test_program{name='001sanity.sh'}
atf_test_program{name='add.sh'}
atf_test_program{name='alias.sh'}
atf_test_program{name='annotate.sh'}