Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
tests: fix lua test that are using new_pkg
Emmanuel Vadot committed 5 years ago
commit 6ce321f4d4cc21f266ce3025bafa0f579d688c32
parent bea10b8
1 file changed +16 -16
modified tests/frontend/lua.sh
@@ -71,7 +71,7 @@ EOF

script_message_body() {
	# The message should be the last thing planned
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
lua_scripts: {
  post-install: [
@@ -98,7 +98,7 @@ EOF

script_rooteddir_body() {
	# The message should be the last thing planned
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
lua_scripts: {
  post-install: [ <<EOS
@@ -134,7 +134,7 @@ EOF
}

script_remove_body() {
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
lua_scripts: {
  post-install: [ <<EOS
@@ -168,7 +168,7 @@ EOF
}

script_rename_body() {
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
lua_scripts: {
  post-install: [ <<EOS
@@ -196,7 +196,7 @@ EOF
}

script_execute_body() {
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
lua_scripts: {
  post-install: [ <<EOS
@@ -224,7 +224,7 @@ pkg: lua script failed\n"
}

script_upgrade_body() {
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
lua_scripts: {
  post-install: [ <<EOS
@@ -250,7 +250,7 @@ EOF
		-s exit:0 \
		pkg -o REPOS_DIR=/dev/null -r ${TMPDIR}/target install -qfy ${TMPDIR}/test-1.txz

-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "2"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "2" "/"
	cat << EOF >> test.ucl
lua_scripts: {
  post-install: [ <<EOS
@@ -292,7 +292,7 @@ EOF
script_filecmp_body() {
	echo "sametext" > a
	echo "sametext" > b
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a: ""
@@ -333,7 +333,7 @@ EOF

	echo "sametext" > a
	echo "differenttext" > b
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a: ""
@@ -370,7 +370,7 @@ script_filecmp_symlink_body() {
	echo "sametext" > b
	ln -s a c
	ln -s b d
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a: ""
@@ -416,7 +416,7 @@ EOF
	echo "differenttext" > b
	ln -s a c
	ln -s b d
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a: ""
@@ -452,7 +452,7 @@ EOF

script_copy_body() {
	echo "sample text" > a.sample
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a.sample: ""
@@ -490,7 +490,7 @@ EOF
script_copy_symlink_body() {
	echo "sample text" > a.sample
	ln -s a.sample b
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a.sample: ""
@@ -534,7 +534,7 @@ EOF

script_sample_not_exists_body() {
	echo "sample text" > a.sample
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a.sample: ""
@@ -573,7 +573,7 @@ EOF

script_sample_exists_body() {
	echo "sample text" > a.sample
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/a.sample: ""
@@ -611,7 +611,7 @@ EOF

script_stat_body() {
	touch plop
-
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1"
+
	atf_check -s exit:0 sh ${RESOURCEDIR}/test_subr.sh new_pkg "test" "test" "1" "/"
	cat << EOF >> test.ucl
files: {
	${TMPDIR}/plop: ""