From 1c9c2f9fcffdc5d66af6e4b3dbf506985ebe438a Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Mon, 24 Mar 2008 06:30:21 +0000
Subject: fixup testing

---
 src/test/einfo.data.list         |   2 +-
 src/test/einfo.funcs.list        |  26 ++++++++
 src/test/librc.funcs.hidden.list |  82 ++++++++++---------------
 src/test/rc.data.list            |   2 +
 src/test/rc.funcs.list           | 129 ++++++++++++++++++++++++---------------
 src/test/symbols.sh              |  30 ++++++---
 6 files changed, 162 insertions(+), 109 deletions(-)

(limited to 'src/test')

diff --git a/src/test/einfo.data.list b/src/test/einfo.data.list
index 8b137891..c638b2f1 100644
--- a/src/test/einfo.data.list
+++ b/src/test/einfo.data.list
@@ -1 +1 @@
-
+EINFO_1.0
diff --git a/src/test/einfo.funcs.list b/src/test/einfo.funcs.list
index da91cc95..5dbbd96f 100644
--- a/src/test/einfo.funcs.list
+++ b/src/test/einfo.funcs.list
@@ -1,26 +1,52 @@
 ebegin
+ebegin@@EINFO_1.0
 ebeginv
+ebeginv@@EINFO_1.0
 ebracket
+ebracket@@EINFO_1.0
 ecolor
+ecolor@@EINFO_1.0
 eend
+eend@@EINFO_1.0
 eendv
+eendv@@EINFO_1.0
 eerror
+eerror@@EINFO_1.0
 eerrorn
+eerrorn@@EINFO_1.0
 eerrorx
+eerrorx@@EINFO_1.0
 eindent
+eindent@@EINFO_1.0
 eindentv
+eindentv@@EINFO_1.0
 einfo
+einfo@@EINFO_1.0
 einfon
+einfon@@EINFO_1.0
 einfov
+einfov@@EINFO_1.0
 einfovn
+einfovn@@EINFO_1.0
 elog
+elog@@EINFO_1.0
 eoutdent
+eoutdent@@EINFO_1.0
 eoutdentv
+eoutdentv@@EINFO_1.0
 eprefix
+eprefix@@EINFO_1.0
 ewarn
+ewarn@@EINFO_1.0
 ewarnn
+ewarnn@@EINFO_1.0
 ewarnv
+ewarnv@@EINFO_1.0
 ewarnvn
+ewarnvn@@EINFO_1.0
 ewarnx
+ewarnx@@EINFO_1.0
 ewend
+ewend@@EINFO_1.0
 ewendv
+ewendv@@EINFO_1.0
diff --git a/src/test/librc.funcs.hidden.list b/src/test/librc.funcs.hidden.list
index e7351de8..614fe3f8 100644
--- a/src/test/librc.funcs.hidden.list
+++ b/src/test/librc.funcs.hidden.list
@@ -1,65 +1,49 @@
-rc_allow_plug
-rc_env_bool
-rc_exists
-rc_filter_env
+rc_config_list
+rc_config_load
+rc_config_value
+rc_deptree_depend
+rc_deptree_depends
+rc_deptree_free
+rc_deptree_load
+rc_deptree_order
+rc_deptree_update
+rc_deptree_update_needed
 rc_find_pids
-rc_free_deptree
-rc_get_config
-rc_get_config_entry
-rc_get_depends
-rc_get_depinfo
-rc_get_deptype
-rc_get_list
-rc_get_runlevel
-rc_get_runlevels
-rc_get_service_option
-rc_is_dir
-rc_is_exec
-rc_is_file
-rc_is_link
-rc_load_deptree
-rc_ls_dir
-rc_make_env
-rc_mark_service
-rc_order_services
-rc_resolve_service
-rc_rm_dir
+rc_getline
+rc_newer_than
 rc_runlevel_exists
+rc_runlevel_get
+rc_runlevel_list
+rc_runlevel_set
 rc_runlevel_starting
 rc_runlevel_stopping
-rc_schedule_clear
-rc_schedule_start_service
 rc_service_add
 rc_service_daemons_crashed
+rc_service_daemon_set
 rc_service_delete
 rc_service_description
 rc_service_exists
+rc_service_extra_commands
 rc_service_in_runlevel
-rc_service_options
+rc_service_mark
+rc_service_resolve
+rc_service_schedule_clear
+rc_service_schedule_start
 rc_services_in_runlevel
 rc_services_in_state
 rc_services_scheduled
 rc_services_scheduled_by
+rc_service_start
 rc_service_started_daemon
 rc_service_state
-rc_set_runlevel
-rc_set_service_daemon
-rc_set_service_option
-rc_start_service
-rc_stop_service
-rc_strcatpaths
-rc_strlist_add
-rc_strlist_addsort
-rc_strlist_addsortc
-rc_strlist_addsortu
-rc_strlist_addu
-rc_strlist_delete
-rc_strlist_free
-rc_strlist_join
-rc_strlist_reverse
-rc_update_deptree
-rc_waitpid
-rc_wait_service
-rc_xmalloc
-rc_xrealloc
-rc_xstrdup
+rc_service_stop
+rc_service_value_get
+rc_service_value_set
+rc_stringlist_add
+rc_stringlist_addu
+rc_stringlist_delete
+rc_stringlist_free
+rc_stringlist_new
+rc_stringlist_sort
+rc_sys
+rc_yesno
diff --git a/src/test/rc.data.list b/src/test/rc.data.list
index 1756ec79..3c27c954 100644
--- a/src/test/rc.data.list
+++ b/src/test/rc.data.list
@@ -1 +1,3 @@
+RC_1.0
 rc_environ_fd
+rc_environ_fd@@RC_1.0
diff --git a/src/test/rc.funcs.list b/src/test/rc.funcs.list
index e7351de8..502867ce 100644
--- a/src/test/rc.funcs.list
+++ b/src/test/rc.funcs.list
@@ -1,65 +1,96 @@
-rc_allow_plug
-rc_env_bool
-rc_exists
-rc_filter_env
+rc_config_list
+rc_config_list@@RC_1.0
+rc_config_load
+rc_config_load@@RC_1.0
+rc_config_value
+rc_config_value@@RC_1.0
+rc_deptree_depend
+rc_deptree_depend@@RC_1.0
+rc_deptree_depends
+rc_deptree_depends@@RC_1.0
+rc_deptree_free
+rc_deptree_free@@RC_1.0
+rc_deptree_load
+rc_deptree_load@@RC_1.0
+rc_deptree_order
+rc_deptree_order@@RC_1.0
+rc_deptree_update
+rc_deptree_update_needed
+rc_deptree_update_needed@@RC_1.0
+rc_deptree_update@@RC_1.0
 rc_find_pids
-rc_free_deptree
-rc_get_config
-rc_get_config_entry
-rc_get_depends
-rc_get_depinfo
-rc_get_deptype
-rc_get_list
-rc_get_runlevel
-rc_get_runlevels
-rc_get_service_option
-rc_is_dir
-rc_is_exec
-rc_is_file
-rc_is_link
-rc_load_deptree
-rc_ls_dir
-rc_make_env
-rc_mark_service
-rc_order_services
-rc_resolve_service
-rc_rm_dir
+rc_find_pids@@RC_1.0
+rc_newer_than
+rc_newer_than@@RC_1.0
 rc_runlevel_exists
+rc_runlevel_exists@@RC_1.0
+rc_runlevel_get
+rc_runlevel_get@@RC_1.0
+rc_runlevel_list
+rc_runlevel_list@@RC_1.0
+rc_runlevel_set
+rc_runlevel_set@@RC_1.0
 rc_runlevel_starting
+rc_runlevel_starting@@RC_1.0
 rc_runlevel_stopping
-rc_schedule_clear
-rc_schedule_start_service
+rc_runlevel_stopping@@RC_1.0
 rc_service_add
+rc_service_add@@RC_1.0
 rc_service_daemons_crashed
+rc_service_daemons_crashed@@RC_1.0
+rc_service_daemon_set
+rc_service_daemon_set@@RC_1.0
 rc_service_delete
+rc_service_delete@@RC_1.0
 rc_service_description
+rc_service_description@@RC_1.0
 rc_service_exists
+rc_service_exists@@RC_1.0
+rc_service_extra_commands
+rc_service_extra_commands@@RC_1.0
 rc_service_in_runlevel
-rc_service_options
+rc_service_in_runlevel@@RC_1.0
+rc_service_mark
+rc_service_mark@@RC_1.0
+rc_service_resolve
+rc_service_resolve@@RC_1.0
+rc_service_schedule_clear
+rc_service_schedule_clear@@RC_1.0
+rc_service_schedule_start
+rc_service_schedule_start@@RC_1.0
 rc_services_in_runlevel
+rc_services_in_runlevel@@RC_1.0
 rc_services_in_state
+rc_services_in_state@@RC_1.0
 rc_services_scheduled
 rc_services_scheduled_by
+rc_services_scheduled_by@@RC_1.0
+rc_services_scheduled@@RC_1.0
+rc_service_start
 rc_service_started_daemon
+rc_service_started_daemon@@RC_1.0
+rc_service_start@@RC_1.0
 rc_service_state
-rc_set_runlevel
-rc_set_service_daemon
-rc_set_service_option
-rc_start_service
-rc_stop_service
-rc_strcatpaths
-rc_strlist_add
-rc_strlist_addsort
-rc_strlist_addsortc
-rc_strlist_addsortu
-rc_strlist_addu
-rc_strlist_delete
-rc_strlist_free
-rc_strlist_join
-rc_strlist_reverse
-rc_update_deptree
-rc_waitpid
-rc_wait_service
-rc_xmalloc
-rc_xrealloc
-rc_xstrdup
+rc_service_state@@RC_1.0
+rc_service_stop
+rc_service_stop@@RC_1.0
+rc_service_value_get
+rc_service_value_get@@RC_1.0
+rc_service_value_set
+rc_service_value_set@@RC_1.0
+rc_stringlist_add
+rc_stringlist_add@@RC_1.0
+rc_stringlist_addu
+rc_stringlist_addu@@RC_1.0
+rc_stringlist_delete
+rc_stringlist_delete@@RC_1.0
+rc_stringlist_free
+rc_stringlist_free@@RC_1.0
+rc_stringlist_new
+rc_stringlist_new@@RC_1.0
+rc_stringlist_sort
+rc_stringlist_sort@@RC_1.0
+rc_sys
+rc_sys@@RC_1.0
+rc_yesno
+rc_yesno@@RC_1.0
diff --git a/src/test/symbols.sh b/src/test/symbols.sh
index a6a66fcd..56fe0489 100755
--- a/src/test/symbols.sh
+++ b/src/test/symbols.sh
@@ -1,13 +1,23 @@
 #!/bin/sh
 
 top_srcdir=${top_srcdir:-../..}
-srcdir=${builddir:-..}
+srcdir=${builddir:-.}
 top_builddir=${top_srcdir:-../..}
-builddir=${builddir:-..}
+builddir=${builddir:-.}
 
-export LD_LIBRARY_PATH=${builddir}:${LD_LIBRARY_PATH}
 . ${top_srcdir}/sh/functions.sh
-export PATH=${builddir}:${PATH}
+
+libeinfo_srcdir="${srcdir}/../libeinfo"
+libeinfo_builddir="${builddir}/../libeinfo"
+librc_srcdir="${srcdir}/../librc"
+librc_builddir="${builddir}/../librc"
+rc_srcdir="${srcdir}/../rc"
+rc_builddir="${builddir}/../rc"
+
+make -s -C ${rc_builddir} links
+
+export LD_LIBRARY_PATH=${libeinfo_builddir}:${librc_builddir}:${LD_LIBRARY_PATH}
+export PATH=${rc_builddir}:${PATH}
 
 checkit() {
 	local base=$1; shift
@@ -21,14 +31,14 @@ ret=0
 
 ebegin "Checking exported symbols in libeinfo.so (data)"
 checkit einfo.data $(
-readelf -Ws ${builddir}/libeinfo.so \
+readelf -Ws ${libeinfo_builddir}/libeinfo.so \
 	| awk '$4 == "OBJECT" && $5 == "GLOBAL" && $7 != "UND" {print $NF}' \
 	| sort -u
 )
 
 ebegin "Checking exported symbols in libeinfo.so (functions)"
 checkit einfo.funcs $(
-readelf -Ws ${builddir}/libeinfo.so \
+readelf -Ws ${libeinfo_builddir}/libeinfo.so \
 	| awk '$4 == "FUNC" && $5 == "GLOBAL" && $7 != "UND" {print $NF}' \
 	| sort -u \
 	| egrep -v \
@@ -37,14 +47,14 @@ readelf -Ws ${builddir}/libeinfo.so \
 
 ebegin "Checking exported symbols in librc.so (data)"
 checkit rc.data $(
-readelf -Ws ${builddir}/librc.so \
+readelf -Ws ${librc_builddir}/librc.so \
 	| awk '$4 == "OBJECT" && $5 == "GLOBAL" && $7 != "UND" {print $NF}' \
 	| sort -u
 )
 
 ebegin "Checking exported symbols in librc.so (functions)"
 checkit rc.funcs $(
-readelf -Ws ${builddir}/librc.so \
+readelf -Ws ${librc_builddir}/librc.so \
 	| awk '$4 == "FUNC" && $5 == "GLOBAL" && $7 != "UND" {print $NF}' \
 	| sort -u \
 	| egrep -v \
@@ -52,10 +62,10 @@ readelf -Ws ${builddir}/librc.so \
 )
 
 ebegin "Checking hidden functions in librc.so"
-sed -n '/^librc_hidden_proto/s:.*(\(.*\))$:\1:p' ../librc.h \
+sed -n '/^librc_hidden_proto/s:.*(\(.*\))$:\1:p' ${librc_srcdir}/librc.h \
 	| sort -u \
 	> librc.funcs.hidden.list
-readelf -Wr $(grep -l '#include[[:space:]]"librc\.h"' ${builddir}/*.c | sed 's:\.c$:.o:') \
+readelf -Wr $(grep -l '#include[[:space:]]"librc\.h"' ${librc_srcdir}/*.c | sed 's:\.c$:.o:') \
 	| awk '$5 ~ /^rc_/ {print $5}' \
 	| sort -u \
 	| egrep -v '^rc_environ_fd$' \
-- 
cgit v1.2.3