From: Duncan Mac-Vicar P Date: Mon, 17 Jul 2006 12:12:08 +0000 (+0000) Subject: this part of the testsuite does not use deja gnu anymore X-Git-Tag: BASE-SuSE-SLE-10-SP2-Branch~542 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4b356b8d276933fd0bd434c3e7062524f3af1a65;p=platform%2Fupstream%2Flibzypp.git this part of the testsuite does not use deja gnu anymore --- diff --git a/testsuite/zypp/tests/Arch.cc b/testsuite/zypp/Arch.cc similarity index 100% rename from testsuite/zypp/tests/Arch.cc rename to testsuite/zypp/Arch.cc diff --git a/testsuite/zypp/tests/Capabilities.cc b/testsuite/zypp/Capabilities.cc similarity index 100% rename from testsuite/zypp/tests/Capabilities.cc rename to testsuite/zypp/Capabilities.cc diff --git a/testsuite/zypp/tests/CheckSum.cc b/testsuite/zypp/CheckSum.cc similarity index 100% rename from testsuite/zypp/tests/CheckSum.cc rename to testsuite/zypp/CheckSum.cc diff --git a/testsuite/zypp/tests/Digest.cc b/testsuite/zypp/Digest.cc similarity index 100% rename from testsuite/zypp/tests/Digest.cc rename to testsuite/zypp/Digest.cc diff --git a/testsuite/zypp/tests/Edition.cc b/testsuite/zypp/Edition.cc similarity index 100% rename from testsuite/zypp/tests/Edition.cc rename to testsuite/zypp/Edition.cc diff --git a/testsuite/zypp/Makefile.am b/testsuite/zypp/Makefile.am index b11dede..c8d5ef9 100644 --- a/testsuite/zypp/Makefile.am +++ b/testsuite/zypp/Makefile.am @@ -1,16 +1,83 @@ ## Process this file with automake to produce Makefile.in ## ################################################## -SUBDIRS = tests +# Do NOT list devel.* in subdirs. It's developers playgound and +# must not prevent anything from building. +SUBDIRS = -PACKAGE=zypp -#AUTOMAKE_OPTIONS = dejagnu +## ################################################## + +TESTS = Arch Url \ + RWPtr \ + Edition \ + Capabilities \ + PtrTypes \ + TranslatedText \ + CheckSum \ + PublicKey \ + PathInfo \ + Digest \ + Signature + +check_PROGRAMS = Arch Url \ + RWPtr \ + Edition \ + Capabilities \ + PtrTypes \ + TranslatedText \ + CheckSum \ + PublicKey \ + PathInfo \ + Digest \ + Signature ## ################################################## -#LDADD = $(top_srcdir)/zypp/lib@PACKAGE@.la +LDADD = $(top_srcdir)/zypp/lib@PACKAGE@.la ## ################################################## -EXTRA_DIST = config/*.exp lib/*exp $(PACKAGE).test/*.exp +Arch_SOURCES = Arch.cc +Arch_LDADD = $(LDADD) -lboost_unit_test_framework + +TranslatedText_SOURCES = TranslatedText.cc + +PublicKey_SOURCES = PublicKey.cc +PublicKey_LDADD = $(LDADD) -lboost_unit_test_framework + +CheckSum_SOURCES = CheckSum.cc +CheckSum_LDADD = $(LDADD) -lboost_unit_test_framework + +RWPtr_SOURCES = RWPtr.cc + +Edition_SOURCES = Edition.cc +Edition_LDADD = $(LDADD) -lboost_unit_test_framework + +Capabilities_SOURCES = Capabilities.cc +Capabilities_LDADD = $(LDADD) -lboost_unit_test_framework + +PtrTypes_SOURCES = PtrTypes.cc + +PathInfo_SOURCES = PathInfo.cc +PathInfo_LDADD = $(LDADD) -lboost_unit_test_framework +Digest_SOURCES = Digest.cc +Digest_LDADD = $(LDADD) -lboost_unit_test_framework + +Signature_SOURCES = Signature.cc +Signature_LDADD = $(LDADD) -lboost_unit_test_framework + +Url_SOURCES = Url.cc +Url_LDADD = $(LDADD) -lboost_unit_test_framework + + +## ################################################## + +.PHONY: always + +$(noinst_PROGRAMS): $(top_srcdir)/zypp/lib@PACKAGE@.la + +#$(top_srcdir)/zypp/lib@PACKAGE@.la: always +# $(MAKE) -C $(top_srcdir)/zypp + +## ################################################## diff --git a/testsuite/zypp/tests/PathInfo.cc b/testsuite/zypp/PathInfo.cc similarity index 100% rename from testsuite/zypp/tests/PathInfo.cc rename to testsuite/zypp/PathInfo.cc diff --git a/testsuite/zypp/tests/PtrTypes.cc b/testsuite/zypp/PtrTypes.cc similarity index 100% rename from testsuite/zypp/tests/PtrTypes.cc rename to testsuite/zypp/PtrTypes.cc diff --git a/testsuite/zypp/tests/PublicKey.cc b/testsuite/zypp/PublicKey.cc similarity index 100% rename from testsuite/zypp/tests/PublicKey.cc rename to testsuite/zypp/PublicKey.cc diff --git a/testsuite/zypp/tests/RWPtr.cc b/testsuite/zypp/RWPtr.cc similarity index 100% rename from testsuite/zypp/tests/RWPtr.cc rename to testsuite/zypp/RWPtr.cc diff --git a/testsuite/zypp/tests/Signature.cc b/testsuite/zypp/Signature.cc similarity index 100% rename from testsuite/zypp/tests/Signature.cc rename to testsuite/zypp/Signature.cc diff --git a/testsuite/zypp/tests/TranslatedText.cc b/testsuite/zypp/TranslatedText.cc similarity index 100% rename from testsuite/zypp/tests/TranslatedText.cc rename to testsuite/zypp/TranslatedText.cc diff --git a/testsuite/zypp/tests/Url.cc b/testsuite/zypp/Url.cc similarity index 100% rename from testsuite/zypp/tests/Url.cc rename to testsuite/zypp/Url.cc diff --git a/testsuite/zypp/config/default.exp b/testsuite/zypp/config/default.exp deleted file mode 100644 index fe1e08a..0000000 --- a/testsuite/zypp/config/default.exp +++ /dev/null @@ -1,2 +0,0 @@ -# default.exp -- empty - diff --git a/testsuite/zypp/config/unix.exp b/testsuite/zypp/config/unix.exp deleted file mode 100644 index b058db3..0000000 --- a/testsuite/zypp/config/unix.exp +++ /dev/null @@ -1,5 +0,0 @@ -load_lib "libzypp_init.exp" - -proc libzypp_exit {} {} -proc libzypp_version {} {} - diff --git a/testsuite/zypp/config/unknown.exp b/testsuite/zypp/config/unknown.exp deleted file mode 100644 index fe48c2f..0000000 --- a/testsuite/zypp/config/unknown.exp +++ /dev/null @@ -1,2 +0,0 @@ -perror "No setup for current configuration" -exit 1 diff --git a/testsuite/zypp/lib/libzypp_init.exp b/testsuite/zypp/lib/libzypp_init.exp deleted file mode 100644 index 2c1e254..0000000 --- a/testsuite/zypp/lib/libzypp_init.exp +++ /dev/null @@ -1,55 +0,0 @@ -# libzypp_init.exp - -# -# run binary $path/$prog -# and expect $expected_result as a result -# (expected_result == 0 ==> program should pass) -# (expected_result == 1 ==> program should fail) -# - -proc runBinary { prog {path ""} {expected_result 0} } { - - if { $path == "" } { set path "tests" } - - set result 0 - set oops [catch { set result [exec "$path/$prog" ">" "/dev/null" "2>/dev/null"] } catched] - - # check if the program crashed - - if {$oops != 0 && $result != 0} { - puts "" - fail "$prog crashed ($oops) with: $catched" - return -1 - } - - # check return code from $prog - - if {$result != ""} { - if {$expected_result != 0} { - xfail $prog # expected failure - return 0 - } - puts "" - warning "Running of $prog results in '$result'" - return -1 - } - - pass $prog - - return 0 -} - -# expect prog to pass - -proc shouldPass { prog {path ""} } { - setenv "ZYPP_TEST_BASE" $path - return [runBinary $prog $path 0] -} - -# expect prog to fail - -proc shouldFail { prog {path ""} } { - setenv "ZYPP_TEST_BASE" $path - return [runBinary $prog $path 1] -} - diff --git a/testsuite/zypp/tests/.cvsignore b/testsuite/zypp/tests/.cvsignore deleted file mode 100644 index d69b34c..0000000 --- a/testsuite/zypp/tests/.cvsignore +++ /dev/null @@ -1,12 +0,0 @@ -Makefile.in -Makefile -.libs -.deps -Arch -Capabilities -Edition -PtrTypes -Url1 -Url2 -Url3 -Url4 diff --git a/testsuite/zypp/tests/Makefile.am b/testsuite/zypp/tests/Makefile.am deleted file mode 100644 index c8d5ef9..0000000 --- a/testsuite/zypp/tests/Makefile.am +++ /dev/null @@ -1,83 +0,0 @@ -## Process this file with automake to produce Makefile.in -## ################################################## - -# Do NOT list devel.* in subdirs. It's developers playgound and -# must not prevent anything from building. -SUBDIRS = - -## ################################################## - -TESTS = Arch Url \ - RWPtr \ - Edition \ - Capabilities \ - PtrTypes \ - TranslatedText \ - CheckSum \ - PublicKey \ - PathInfo \ - Digest \ - Signature - -check_PROGRAMS = Arch Url \ - RWPtr \ - Edition \ - Capabilities \ - PtrTypes \ - TranslatedText \ - CheckSum \ - PublicKey \ - PathInfo \ - Digest \ - Signature - -## ################################################## - -LDADD = $(top_srcdir)/zypp/lib@PACKAGE@.la - -## ################################################## - -Arch_SOURCES = Arch.cc -Arch_LDADD = $(LDADD) -lboost_unit_test_framework - -TranslatedText_SOURCES = TranslatedText.cc - -PublicKey_SOURCES = PublicKey.cc -PublicKey_LDADD = $(LDADD) -lboost_unit_test_framework - -CheckSum_SOURCES = CheckSum.cc -CheckSum_LDADD = $(LDADD) -lboost_unit_test_framework - -RWPtr_SOURCES = RWPtr.cc - -Edition_SOURCES = Edition.cc -Edition_LDADD = $(LDADD) -lboost_unit_test_framework - -Capabilities_SOURCES = Capabilities.cc -Capabilities_LDADD = $(LDADD) -lboost_unit_test_framework - -PtrTypes_SOURCES = PtrTypes.cc - -PathInfo_SOURCES = PathInfo.cc -PathInfo_LDADD = $(LDADD) -lboost_unit_test_framework - -Digest_SOURCES = Digest.cc -Digest_LDADD = $(LDADD) -lboost_unit_test_framework - -Signature_SOURCES = Signature.cc -Signature_LDADD = $(LDADD) -lboost_unit_test_framework - -Url_SOURCES = Url.cc -Url_LDADD = $(LDADD) -lboost_unit_test_framework - - -## ################################################## - -.PHONY: always - -$(noinst_PROGRAMS): $(top_srcdir)/zypp/lib@PACKAGE@.la - -#$(top_srcdir)/zypp/lib@PACKAGE@.la: always -# $(MAKE) -C $(top_srcdir)/zypp - -## ################################################## diff --git a/testsuite/zypp/zypp.test/Arch.exp b/testsuite/zypp/zypp.test/Arch.exp deleted file mode 100644 index 1024d61..0000000 --- a/testsuite/zypp/zypp.test/Arch.exp +++ /dev/null @@ -1,4 +0,0 @@ -# Arch.exp -# run tests for Arch - - shouldPass "Arch" diff --git a/testsuite/zypp/zypp.test/Capabilities.exp b/testsuite/zypp/zypp.test/Capabilities.exp deleted file mode 100644 index 74383c0..0000000 --- a/testsuite/zypp/zypp.test/Capabilities.exp +++ /dev/null @@ -1,4 +0,0 @@ -# Arch.exp -# run tests for Arch - -shouldPass "Capabilities" diff --git a/testsuite/zypp/zypp.test/CheckSum.exp b/testsuite/zypp/zypp.test/CheckSum.exp deleted file mode 100644 index 38cc70a..0000000 --- a/testsuite/zypp/zypp.test/CheckSum.exp +++ /dev/null @@ -1 +0,0 @@ -shouldPass "CheckSum" diff --git a/testsuite/zypp/zypp.test/Edition.exp b/testsuite/zypp/zypp.test/Edition.exp deleted file mode 100644 index b178070..0000000 --- a/testsuite/zypp/zypp.test/Edition.exp +++ /dev/null @@ -1,4 +0,0 @@ -# Edition.exp -# run tests for Edition - - shouldPass "Edition" diff --git a/testsuite/zypp/zypp.test/PathInfo.exp b/testsuite/zypp/zypp.test/PathInfo.exp deleted file mode 100644 index 7d82937..0000000 --- a/testsuite/zypp/zypp.test/PathInfo.exp +++ /dev/null @@ -1 +0,0 @@ -shouldPass "PathInfo" diff --git a/testsuite/zypp/zypp.test/PtrTypes.exp b/testsuite/zypp/zypp.test/PtrTypes.exp deleted file mode 100644 index 64707c2..0000000 --- a/testsuite/zypp/zypp.test/PtrTypes.exp +++ /dev/null @@ -1,4 +0,0 @@ -# PtrTypes.exp -# run tests for PtrTypes - - shouldPass "PtrTypes" diff --git a/testsuite/zypp/zypp.test/PublicKey.exp b/testsuite/zypp/zypp.test/PublicKey.exp deleted file mode 100644 index 3e89d07..0000000 --- a/testsuite/zypp/zypp.test/PublicKey.exp +++ /dev/null @@ -1 +0,0 @@ - shouldPass "PublicKey" diff --git a/testsuite/zypp/zypp.test/RWPtr.exp b/testsuite/zypp/zypp.test/RWPtr.exp deleted file mode 100644 index 8d93e17..0000000 --- a/testsuite/zypp/zypp.test/RWPtr.exp +++ /dev/null @@ -1,4 +0,0 @@ -# RWPtr.exp -# run tests for RWPtr - - shouldPass "RWPtr" diff --git a/testsuite/zypp/zypp.test/Signature.exp b/testsuite/zypp/zypp.test/Signature.exp deleted file mode 100644 index 4d02368..0000000 --- a/testsuite/zypp/zypp.test/Signature.exp +++ /dev/null @@ -1,2 +0,0 @@ -shouldPass "Signature" - diff --git a/testsuite/zypp/zypp.test/TranslatedText.exp b/testsuite/zypp/zypp.test/TranslatedText.exp deleted file mode 100644 index 03750e1..0000000 --- a/testsuite/zypp/zypp.test/TranslatedText.exp +++ /dev/null @@ -1,4 +0,0 @@ -# TranslatedText.exp -# run tests for TranslatedText - - shouldPass "TranslatedText" diff --git a/testsuite/zypp/zypp.test/Url.exp b/testsuite/zypp/zypp.test/Url.exp deleted file mode 100644 index 9959e90..0000000 --- a/testsuite/zypp/zypp.test/Url.exp +++ /dev/null @@ -1,4 +0,0 @@ -# Url.exp -# run tests for Url - - shouldPass "Url"