From 9c6732485417c789e321745f4f04bc862d18af6e Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Mon, 20 Jun 2022 12:25:23 +0200 Subject: [PATCH] tests: abuild: port duplicate checksum test --- tests/abuild_test | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tests/abuild_test b/tests/abuild_test index 5b7714b..1ebcc26 100755 --- a/tests/abuild_test +++ b/tests/abuild_test @@ -12,7 +12,8 @@ init_tests \ abuild_dbg_subpackage \ abuild_SETFATTR_in_dbg \ abuild_reproducible \ - abuild_checksum_generation + abuild_checksum_generation \ + abuild_checksum_duplicates export ABUILD_SHAREDIR=$(atf_get_srcdir)/.. export ABUILD_CONF=/dev/null @@ -241,3 +242,18 @@ abuild_checksum_generation_body() { sha512sum -c sums || atf_fail "checksum mismatch" } +abuild_checksum_duplicates_body() { + mkdir -p foo/dir1 foo/dir2 + cat > foo/APKBUILD <<-EOF + pkgname="foo" + pkgver="1.0" + source="dir1/testfile dir2/testfile" + EOF + echo "first" > foo/dir1/testfile + echo "second" > foo/dir2/testfile + cd foo + atf_check -s exit:1 \ + -e match:"ERROR:.*duplicate found" \ + abuild checksum +} +