Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
tests: Use "bsdtar" instead "tar"
Alex Richardson committed 5 years ago
commit a8c5bcc6cb5b893a9c764b0a45937cc4c92320c1
parent 4e913f1
2 files changed +20 -25
modified tests/frontend/create.sh
@@ -91,7 +91,7 @@ create_from_plist_body() {
		-o match:"-rw-r--r-- .*root[ /]+wheel.* /file1$" \
		-e ignore \
		-s exit:0 \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}

create_from_plist_set_owner_body() {
@@ -109,7 +109,7 @@ create_from_plist_set_owner_body() {
		-o match:"-rw-r--r-- .*plop[ /]+wheel.* /file1$" \
		-e ignore \
		-s exit:0 \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}

create_from_plist_set_group_body() {
@@ -127,7 +127,7 @@ create_from_plist_set_group_body() {
		-o match:"-rw-r--r-- .*root[ /]+bla.* /file1$" \
		-e ignore \
		-s exit:0 \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}


@@ -146,7 +146,7 @@ create_from_plist_set_group_space_body() {
		-o match:"-rw-r--r-- .*root[ /]+bla.* /file1$" \
		-e ignore \
		-s exit:0 \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}

create_from_plist_gather_mode_body() {
@@ -166,7 +166,7 @@ create_from_plist_gather_mode_body() {
		-o match:"-rwxrwxrwx .*plop[ /]+bla.* /file1$" \
		-e ignore \
		-s exit:0 \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}

create_from_plist_set_mode_body() {
@@ -184,7 +184,7 @@ create_from_plist_set_mode_body() {
		-o match:"-rwxr-sr-x .*root[ /]+wheel.* /file1$" \
		-e ignore \
		-s exit:0 \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}

create_from_plist_mini_body() {
@@ -202,7 +202,7 @@ create_from_plist_mini_body() {
		-o match:"-rw-r--r-- .*plop[ /]+wheel.* /file1$" \
		-e ignore \
		-s exit:0 \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}

create_from_plist_dirrm_body() {
@@ -238,7 +238,7 @@ aline"
		-o inline:"+COMPACT_MANIFEST\n+MANIFEST\n" \
		-e empty \
		-s exit:0 \
-
		tar tf test-1.pkg
+
		bsdtar tf test-1.pkg

	atf_check \
		-o empty \
@@ -676,26 +676,22 @@ EOF
	pattern=$(ls -l ${TMPDIR}/a | awk '{print $6" +"$7" +"$8".*/a"}')
	atf_check pkg create -M test.ucl
	atf_check env SOURCE_DATE_EPOCH=86400 pkg create -M test.ucl
-
	# -e ignore needed since GNU tar prints "tar: Removing leading `/' from member names"
-
	atf_check -e ignore \
+
	atf_check \
		-o match:"0 Jan +2 +1970.*/a" \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
	atf_check -e match:"Invalid" -s exit:1 pkg create -t meh -M test.ucl
	atf_check pkg create -t 172800 -M test.ucl
-
	# -e ignore needed since GNU tar prints "tar: Removing leading `/' from member names"
-
	atf_check -e ignore \
+
	atf_check \
		-o match:"0 Jan +3 +1970.*/a" \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
	atf_check env SOURCE_DATE_EPOCH=86400 pkg create -t 172800 -M test.ucl
-
	# -e ignore needed since GNU tar prints "tar: Removing leading `/' from member names"
-
	atf_check -e ignore \
+
	atf_check \
		-o match:"0 Jan +3 +1970.*/a" \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
	atf_check pkg create -M test.ucl
-
	# -e ignore needed since GNU tar prints "tar: Removing leading `/' from member names"
-
	atf_check -e ignore \
+
	atf_check \
		-o match:"${pattern}" \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg

	mkdir target
	atf_check -o empty \
@@ -784,10 +780,9 @@ touch A B
	atf_check \
		-s exit:0 \
		pkg -o PLIST_KEYWORDS_DIR=. create -o ${TMPDIR} -m . -p test.plist -r .
-
	# -e ignore needed since GNU tar prints "tar: Removing leading `/' from member names"
-
	atf_check -e ignore \
+
	atf_check \
		-o match:"-rw-r--r-- .*plop[ /]+wheel.* /A$" \
-
		tar tvf test-1.pkg
+
		bsdtar tvf test-1.pkg
}

create_from_plist_keyword_deprecated_body()
modified tests/frontend/extract.sh
@@ -113,7 +113,7 @@ EOF
	atf_check \
		-o match:"^-r-sr-xr-- " \
		-e ignore \
-
		tar tvf ${TMPDIR}/test-1.pkg
+
		bsdtar tvf ${TMPDIR}/test-1.pkg

	mkdir ${TMPDIR}/target
	atf_check \
@@ -153,7 +153,7 @@ EOF
		-o match:"^-r-sr-xr--.*a$" \
		-o match:"^hr-sr-xr--.*a$" \
		-e ignore \
-
		tar tvf ${TMPDIR}/test-1.pkg
+
		bsdtar tvf ${TMPDIR}/test-1.pkg

	mkdir ${TMPDIR}/target
	atf_check \