aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-03 22:07:14 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-12-03 22:07:14 +0000
commitab61e6baa1913d264380af587675e8eaeaff2d06 (patch)
tree77c49eb6d6bd1e740f0fd87d82d3454fcae67cf1
parentfc37dc73312185e512e30ab66aa6d4b5ba866478 (diff)
downloadpaludis-ab61e6baa1913d264380af587675e8eaeaff2d06.tar.gz
paludis-ab61e6baa1913d264380af587675e8eaeaff2d06.tar.xz
Use an explicit path for merge and unmerge. Move things around to make this easier.
-rw-r--r--ebuild/Makefile.am27
-rw-r--r--ebuild/builtin_merge.bash4
-rw-r--r--ebuild/builtin_unmerge.bash2
-rw-r--r--ebuild/merge.cc (renamed from ebuild/utils/merge.cc)0
-rw-r--r--ebuild/merge_TEST.bash (renamed from ebuild/utils/merge_TEST.bash)18
-rwxr-xr-xebuild/merge_TEST_cleanup.sh (renamed from ebuild/utils/merge_TEST_cleanup.sh)0
-rwxr-xr-xebuild/merge_TEST_setup.sh (renamed from ebuild/utils/merge_TEST_setup.sh)0
-rw-r--r--ebuild/merge_common.cc (renamed from ebuild/utils/merge_common.cc)0
-rw-r--r--ebuild/merge_common.hh (renamed from ebuild/utils/merge_common.hh)0
-rwxr-xr-x[-rw-r--r--]ebuild/run_test.bash0
-rw-r--r--ebuild/unmerge.cc (renamed from ebuild/utils/unmerge.cc)0
-rw-r--r--ebuild/unmerge_TEST.bash (renamed from ebuild/utils/unmerge_TEST.bash)8
-rwxr-xr-xebuild/unmerge_TEST_cleanup.sh (renamed from ebuild/utils/unmerge_TEST_cleanup.sh)0
-rwxr-xr-xebuild/unmerge_TEST_setup.sh (renamed from ebuild/utils/unmerge_TEST_setup.sh)0
-rw-r--r--ebuild/utils/Makefile.am18
-rwxr-xr-xtest/run_test.sh7
16 files changed, 47 insertions, 37 deletions
diff --git a/ebuild/Makefile.am b/ebuild/Makefile.am
index 784e9c3..62683ed 100644
--- a/ebuild/Makefile.am
+++ b/ebuild/Makefile.am
@@ -42,14 +42,33 @@ libexecprog_SCRIPTS = \
TESTS_ENVIRONMENT = env \
PALUDIS_EBUILD_DIR="$(top_srcdir)/ebuild/" \
PALUDIS_EBUILD_LOG_LEVEL="warning" \
+ TOP_BUILD_DIR="`$(top_srcdir)/ebuild/utils/canonicalise $(top_builddir)/`" \
TEST_SCRIPT_DIR="$(srcdir)/" \
- bash $(top_srcdir)/ebuild/run_test.bash
+ bash $(top_srcdir)/test/run_test.sh $(top_srcdir)/ebuild/run_test.bash
+
+TESTS = echo_functions_TEST.bash list_functions_TEST.bash kernel_functions_TEST.bash \
+ merge_TEST.bash unmerge_TEST.bash
-TESTS = echo_functions_TEST.bash list_functions_TEST.bash kernel_functions_TEST.bash
EXTRA_DIST = $(libexecprog_SCRIPTS) run_test.bash $(TESTS)
-check_SCRIPTS = run_test.bash $(TESTS)
-check_PROGRAMS =
+libexecprog_PROGRAMS = merge unmerge
+merge_SOURCES = merge.cc merge_common.cc merge_common.hh
+merge_LDADD = \
+ $(top_builddir)/paludis/util/libpaludisutil.la \
+ $(top_builddir)/paludis/digests/libpaludisdigests.la \
+ $(top_builddir)/paludis/selinux/libpaludisselinux.la \
+ $(DYNAMIC_LD_LIBS)
+
+unmerge_SOURCES = unmerge.cc merge_common.cc merge_common.hh
+unmerge_LDADD = \
+ $(top_builddir)/paludis/util/libpaludisutil.la \
+ $(top_builddir)/paludis/digests/libpaludisdigests.la
+
+
+check_SCRIPTS = $(TESTS) \
+ merge_TEST_setup.sh merge_TEST_cleanup.sh \
+ unmerge_TEST_setup.sh unmerge_TEST_cleanup.sh \
+ run_test.bash $(TESTS)
built-sources : $(BUILT_SOURCES)
for s in `echo $(SUBDIRS) | tr -d .` ; do $(MAKE) -C $$s built-sources || exit 1 ; done
diff --git a/ebuild/builtin_merge.bash b/ebuild/builtin_merge.bash
index 4903513..a0faab9 100644
--- a/ebuild/builtin_merge.bash
+++ b/ebuild/builtin_merge.bash
@@ -78,7 +78,7 @@ builtin_merge()
if [[ -n "${D}" ]] && [[ -d "${D}" ]] ; then
install -d "${ROOT%/}/" || die "couldn't make \${ROOT} (\"${ROOT}\")"
if [[ -d "${D}" ]] ; then
- merge "${D%/}/" "${ROOT%/}/" "${dbdir}/CONTENTS" \
+ "${PALUDIS_EBUILD_DIR}/"merge "${D%/}/" "${ROOT%/}/" "${dbdir}/CONTENTS" \
|| die "merge failed"
fi
fi
@@ -89,7 +89,7 @@ builtin_merge()
fi
if [[ -n "${reinstall}" ]] ; then
- unmerge "${ROOT%/}/" "${dbdir}/OLDCONTENTS" \
+ "${PALUDIS_EBUILD_DIR}/"unmerge "${ROOT%/}/" "${dbdir}/OLDCONTENTS" \
|| die "unmerge failed"
if ! /bin/sh -c 'echo Good, our shell is still usable' ; then
diff --git a/ebuild/builtin_unmerge.bash b/ebuild/builtin_unmerge.bash
index 89ca631..195ef4d 100644
--- a/ebuild/builtin_unmerge.bash
+++ b/ebuild/builtin_unmerge.bash
@@ -73,7 +73,7 @@ builtin_unmerge()
export CONFIG_PROTECT="${CONFIG_PROTECT}"
export CONFIG_PROTECT_MASK="${CONFIG_PROTECT_MASK}"
- unmerge "${ROOT}/" "${dbdir}/CONTENTS" \
+ "${PALUDIS_EBUILD_DIR}/"unmerge "${ROOT}/" "${dbdir}/CONTENTS" \
|| die "unmerge failed"
if ! /bin/sh -c 'echo Good, our shell is still usable' ; then
diff --git a/ebuild/utils/merge.cc b/ebuild/merge.cc
index 10ae7e8..10ae7e8 100644
--- a/ebuild/utils/merge.cc
+++ b/ebuild/merge.cc
diff --git a/ebuild/utils/merge_TEST.bash b/ebuild/merge_TEST.bash
index 07a10d1..940b7fa 100644
--- a/ebuild/utils/merge_TEST.bash
+++ b/ebuild/merge_TEST.bash
@@ -18,7 +18,7 @@
merge_empty_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/empty_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/empty_src" \
"merge_TEST_dir/empty_dst" \
"merge_TEST_dir/empty_contents" 1>/dev/null
test_return_code
@@ -26,7 +26,7 @@ merge_empty_TEST()
merge_files_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/files_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/files_src" \
"merge_TEST_dir/files_dst" \
"merge_TEST_dir/files_contents" 1>/dev/null
test_return_code
@@ -40,7 +40,7 @@ merge_files_TEST()
merge_dirs_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/dirs_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/dirs_src" \
"merge_TEST_dir/dirs_dst" \
"merge_TEST_dir/dirs_contents" 1>/dev/null
test_return_code
@@ -61,7 +61,7 @@ merge_dirs_TEST()
merge_dirs_over_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/dirs_over_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/dirs_over_src" \
"merge_TEST_dir/dirs_over_dst" \
"merge_TEST_dir/dirs_over_contents" 1>/dev/null
test_return_code
@@ -82,7 +82,7 @@ merge_dirs_over_TEST()
merge_links_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/links_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/links_src" \
"merge_TEST_dir/links_dst" \
"merge_TEST_dir/links_contents" 1>/dev/null
test_return_code
@@ -100,7 +100,7 @@ merge_links_TEST()
merge_links_over_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/links_over_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/links_over_src" \
"merge_TEST_dir/links_over_dst" \
"merge_TEST_dir/links_over_contents" 1>/dev/null
test_return_code
@@ -122,7 +122,7 @@ merge_links_over_TEST()
merge_links_over_dir_TEST()
{
- ! ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/links_over_dir_src" \
+ ! ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/links_over_dir_src" \
"merge_TEST_dir/links_over_dir_dst" \
"merge_TEST_dir/links_over_dir_contents" &>/dev/null
test_return_code
@@ -132,7 +132,7 @@ merge_config_protect_TEST()
{
export CONFIG_PROTECT=/dir
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/config_pro_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/config_pro_src" \
"merge_TEST_dir/config_pro_dst" \
"merge_TEST_dir/config_pro_contents" 1>/dev/null
test_return_code
@@ -178,7 +178,7 @@ merge_config_protect_noroot_TEST()
{
export CONFIG_PROTECT=$(${PALUDIS_EBUILD_DIR}/utils/canonicalise `pwd` )/merge_TEST_dir/noroot_dst/dir
- ${TOP_BUILD_DIR}/ebuild/utils/merge "merge_TEST_dir/config_pro_noroot_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "merge_TEST_dir/config_pro_noroot_src" \
"/" \
"merge_TEST_dir/config_pro_slash_root_contents" 1>/dev/null
test_return_code
diff --git a/ebuild/utils/merge_TEST_cleanup.sh b/ebuild/merge_TEST_cleanup.sh
index 4b40b8f..4b40b8f 100755
--- a/ebuild/utils/merge_TEST_cleanup.sh
+++ b/ebuild/merge_TEST_cleanup.sh
diff --git a/ebuild/utils/merge_TEST_setup.sh b/ebuild/merge_TEST_setup.sh
index 4af857d..4af857d 100755
--- a/ebuild/utils/merge_TEST_setup.sh
+++ b/ebuild/merge_TEST_setup.sh
diff --git a/ebuild/utils/merge_common.cc b/ebuild/merge_common.cc
index 27b9e11..27b9e11 100644
--- a/ebuild/utils/merge_common.cc
+++ b/ebuild/merge_common.cc
diff --git a/ebuild/utils/merge_common.hh b/ebuild/merge_common.hh
index 6f06648..6f06648 100644
--- a/ebuild/utils/merge_common.hh
+++ b/ebuild/merge_common.hh
diff --git a/ebuild/run_test.bash b/ebuild/run_test.bash
index b5587b9..b5587b9 100644..100755
--- a/ebuild/run_test.bash
+++ b/ebuild/run_test.bash
diff --git a/ebuild/utils/unmerge.cc b/ebuild/unmerge.cc
index fa55d41..fa55d41 100644
--- a/ebuild/utils/unmerge.cc
+++ b/ebuild/unmerge.cc
diff --git a/ebuild/utils/unmerge_TEST.bash b/ebuild/unmerge_TEST.bash
index 8efc7d6..f3076b8 100644
--- a/ebuild/utils/unmerge_TEST.bash
+++ b/ebuild/unmerge_TEST.bash
@@ -18,12 +18,12 @@
unmerge_empty_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "unmerge_TEST_dir/empty_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "unmerge_TEST_dir/empty_src" \
"unmerge_TEST_dir/empty_dst" \
"unmerge_TEST_dir/empty_contents" 1>/dev/null
test_return_code
- ${TOP_BUILD_DIR}/ebuild/utils/unmerge "unmerge_TEST_dir/empty_dst" \
+ ${TOP_BUILD_DIR}/ebuild/unmerge "unmerge_TEST_dir/empty_dst" \
"unmerge_TEST_dir/empty_contents" 1>/dev/null
test_return_code
@@ -38,7 +38,7 @@ unmerge_empty_TEST()
unmerge_files_TEST()
{
- ${TOP_BUILD_DIR}/ebuild/utils/merge "unmerge_TEST_dir/files_src" \
+ ${TOP_BUILD_DIR}/ebuild/merge "unmerge_TEST_dir/files_src" \
"unmerge_TEST_dir/files_dst" \
"unmerge_TEST_dir/files_contents" 1>/dev/null
test_return_code
@@ -51,7 +51,7 @@ unmerge_files_TEST()
done
test_equality "$ok" "yes"
- ${TOP_BUILD_DIR}/ebuild/utils/unmerge "unmerge_TEST_dir/files_dst" \
+ ${TOP_BUILD_DIR}/ebuild/unmerge "unmerge_TEST_dir/files_dst" \
"unmerge_TEST_dir/files_contents" 1>/dev/null
test_return_code
diff --git a/ebuild/utils/unmerge_TEST_cleanup.sh b/ebuild/unmerge_TEST_cleanup.sh
index e0f01b6..e0f01b6 100755
--- a/ebuild/utils/unmerge_TEST_cleanup.sh
+++ b/ebuild/unmerge_TEST_cleanup.sh
diff --git a/ebuild/utils/unmerge_TEST_setup.sh b/ebuild/unmerge_TEST_setup.sh
index 158e2ae..158e2ae 100755
--- a/ebuild/utils/unmerge_TEST_setup.sh
+++ b/ebuild/unmerge_TEST_setup.sh
diff --git a/ebuild/utils/Makefile.am b/ebuild/utils/Makefile.am
index 49eb7d2..a038d27 100644
--- a/ebuild/utils/Makefile.am
+++ b/ebuild/utils/Makefile.am
@@ -55,21 +55,8 @@ libexecprog_SCRIPTS = \
prepalldocs \
$(libexecprog_SCRIPTS_extra)
-libexecprog_PROGRAMS = merge unmerge
AM_CXXFLAGS = -I$(top_srcdir) @PALUDIS_CXXFLAGS@
-merge_SOURCES = merge.cc merge_common.cc merge_common.hh
-merge_LDADD = \
- $(top_builddir)/paludis/util/libpaludisutil.la \
- $(top_builddir)/paludis/digests/libpaludisdigests.la \
- $(top_builddir)/paludis/selinux/libpaludisselinux.la \
- $(DYNAMIC_LD_LIBS)
-
-unmerge_SOURCES = unmerge.cc merge_common.cc merge_common.hh
-unmerge_LDADD = \
- $(top_builddir)/paludis/util/libpaludisutil.la \
- $(top_builddir)/paludis/digests/libpaludisdigests.la
-
TESTS_ENVIRONMENT = env \
PALUDIS_EBUILD_DIR="`$(top_srcdir)/ebuild/utils/canonicalise $(top_srcdir)/ebuild/`" \
TOP_BUILD_DIR="`$(top_srcdir)/ebuild/utils/canonicalise $(top_builddir)/`" \
@@ -77,10 +64,7 @@ TESTS_ENVIRONMENT = env \
TEST_SCRIPT_DIR="$(srcdir)/" \
bash $(top_srcdir)/ebuild/utils/run_test.bash
-TESTS = merge_TEST.bash dobin_TEST.bash unmerge_TEST.bash
-check_SCRIPTS = $(TESTS) \
- merge_TEST_setup.sh merge_TEST_cleanup.sh \
- unmerge_TEST_setup.sh unmerge_TEST_cleanup.sh
+TESTS = dobin_TEST.bash
prep_scripts = prepall prepallstrip prepallman prepallinfo prepstrip prepman prepinfo prepdocs prepalldocs
diff --git a/test/run_test.sh b/test/run_test.sh
index 4cdeedf..9b7050b 100755
--- a/test/run_test.sh
+++ b/test/run_test.sh
@@ -4,6 +4,7 @@
testname=${2:-${1}}
testname=${testname%.rb}
testname=${testname%.py}
+testname=${testname%.bash}
if test -f "$TEST_SCRIPT_DIR""${testname}"_"cleanup.sh" ; then
echo ">>> cleanup for test ${testname}"
@@ -11,6 +12,8 @@ if test -f "$TEST_SCRIPT_DIR""${testname}"_"cleanup.sh" ; then
echo ">>> exiting with error for test ${testname}"
exit 255
fi
+else
+ echo ">>> No $TEST_SCRIPT_DIR${testname}_cleanup.sh to run"
fi
if test -f "$TEST_SCRIPT_DIR""${testname}"_"setup.sh" ; then
@@ -19,6 +22,8 @@ if test -f "$TEST_SCRIPT_DIR""${testname}"_"setup.sh" ; then
echo ">>> exiting with error for test ${testname}"
exit 255
fi
+else
+ echo ">>> No $TEST_SCRIPT_DIR${testname}_setup.sh to run"
fi
echo ">>> test ${testname}"
@@ -40,6 +45,8 @@ if test -f "$TEST_SCRIPT_DIR""${testname}"_"cleanup.sh" ; then
echo ">>> exiting with error for test ${testname}"
exit 255
fi
+else
+ echo ">>> No $TEST_SCRIPT_DIR${testname}_cleanup.sh to run"
fi
echo ">>> exiting with success for test ${testname}"