Author: dmacvicar
Date: Sat Feb 2 23:26:27 2008
New Revision: 8449
URL: http://svn.opensuse.org/viewcvs/zypp?rev=8449&view=rev
Log:
testcase for Sysconfig.
TODO: this has to be moved to parser someday
Added:
branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/
branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/CMakeLists.txt
branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/Sysconfig_test.cc
branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/data/
branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/data/Sysconfig/
branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/data/Sysconfig/proxy
Modified:
branches/tmp/ma/jump_sat/libzypp/tests/zypp/CMakeLists.txt
branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
Modified: branches/tmp/ma/jump_sat/libzypp/tests/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/tests/zypp/CMakeLists.txt?rev=8449&r1=8448&r2=8449&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/tests/zypp/CMakeLists.txt (original)
+++ branches/tmp/ma/jump_sat/libzypp/tests/zypp/CMakeLists.txt Sat Feb 2 23:26:27 2008
@@ -1,6 +1,8 @@
# source: ${loop_var}_test.cc
# executable: ${loop_var}_test
# test: ${loop_var}_test
+ADD_SUBDIRECTORY(base)
+
FOREACH( loop_var ResKind)
ADD_EXECUTABLE( ${loop_var}_test ${loop_var}_test.cc )
TARGET_LINK_LIBRARIES( ${loop_var}_test zypp boost_unit_test_framework )
Added: branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/CMakeLists.txt?rev=8449&view=auto
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/CMakeLists.txt (added)
+++ branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/CMakeLists.txt Sat Feb 2 23:26:27 2008
@@ -0,0 +1,5 @@
+FOREACH( loop_var Sysconfig )
+ ADD_EXECUTABLE( ${loop_var}_test ${loop_var}_test.cc )
+ TARGET_LINK_LIBRARIES( ${loop_var}_test zypp boost_unit_test_framework )
+ ADD_TEST( ${loop_var}_test ${CMAKE_CURRENT_BINARY_DIR}/${loop_var}_test)
+ENDFOREACH( loop_var )
Added: branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/Sysconfig_test.cc
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/Sysconfig_test.cc?rev=8449&view=auto
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/Sysconfig_test.cc (added)
+++ branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/Sysconfig_test.cc Sat Feb 2 23:26:27 2008
@@ -0,0 +1,60 @@
+
+#include <iostream>
+#include <fstream>
+#include <map>
+#include <string>
+
+#include "zypp/base/Logger.h"
+#include "zypp/base/Exception.h"
+#include "zypp/TmpPath.h"
+#include "zypp/PathInfo.h"
+
+
+#include
+#include
+#include
+
+#include "zypp/base/Sysconfig.h"
+
+using boost::unit_test::test_suite;
+using boost::unit_test::test_case;
+using namespace boost::unit_test::log;
+
+using namespace std;
+using namespace zypp;
+
+
+void sysconfig_test( const string &dir )
+{
+ Pathname file = Pathname(dir) + "proxy";
+ map values = zypp::base::sysconfig::read(file);
+ BOOST_CHECK_EQUAL( values.size(), 6 );
+
+
+}
+
+test_suite*
+init_unit_test_suite( int argc, char* argv[] )
+{
+ string datadir;
+ if (argc < 2)
+ {
+ datadir = TESTS_SRC_DIR;
+ datadir = (Pathname(datadir) + "/zypp/base/data/Sysconfig").asString();
+ cout << "sysconfig_test:"
+ " path to directory with test data required as parameter. Using " << datadir << endl;
+ //return (test_suite *)0;
+ }
+ else
+ {
+ datadir = argv[1];
+ }
+
+ std::string const params[] = { datadir };
+ //set_log_stream( std::cout );
+ test_suite* test= BOOST_TEST_SUITE( "SysconfigTest" );
+ test->add(BOOST_PARAM_TEST_CASE( &sysconfig_test,
+ (std::string const*)params, params+1));
+ return test;
+}
+
Added: branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/data/Sysconfig/proxy
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/data/Sysconfig/proxy?rev=8449&view=auto
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/data/Sysconfig/proxy (added)
+++ branches/tmp/ma/jump_sat/libzypp/tests/zypp/base/data/Sysconfig/proxy Sat Feb 2 23:26:27 2008
@@ -0,0 +1,51 @@
+## Path: Network/Proxy
+## Description:
+## Type: yesno
+## Default: no
+## Config: kde,profiles
+#
+# Enable a generation of the proxy settings to the profile.
+# This setting allows to turn the proxy on and off while
+# preserving the particular proxy setup.
+#
+PROXY_ENABLED="no"
+
+## Type: string
+## Default: ""
+#
+# Some programs (e.g. lynx, arena and wget) support proxies, if set in
+# the environment. SuSEconfig can add these environment variables to
+# /etc/SuSEconfig/* (sourced by /etc/profile etc.) -
+# See http://portal.suse.com/sdb/en/1998/01/lynx_proxy.html for more details.
+# Example: HTTP_PROXY="http://proxy.provider.de:3128/"
+HTTP_PROXY=""
+
+## Type: string
+## Default: ""
+#
+# Some programs (e.g. lynx, arena and wget) support proxies, if set in
+# the environment. SuSEconfig can add these environment variables to
+# /etc/SuSEconfig/* (sourced by /etc/profile etc.) -
+# this setting is for https connections
+HTTPS_PROXY=""
+
+## Type: string
+## Default: ""
+#
+# Example: FTP_PROXY="http://proxy.provider.de:3128/"
+#
+FTP_PROXY=""
+
+## Type: string
+## Default: ""
+#
+# Example: GOPHER_PROXY="http://proxy.provider.de:3128/"
+#
+GOPHER_PROXY=""
+
+## Type: string(localhost)
+## Default: localhost
+#
+# Example: NO_PROXY="www.me.de, do.main, localhost"
+#
+NO_PROXY="localhost, 127.0.0.1"
Modified: branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt
URL: http://svn.opensuse.org/viewcvs/zypp/branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt?rev=8449&r1=8448&r2=8449&view=diff
==============================================================================
--- branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt (original)
+++ branches/tmp/ma/jump_sat/libzypp/zypp/CMakeLists.txt Sat Feb 2 23:26:27 2008
@@ -11,88 +11,93 @@
ADD_CUSTOM_COMMAND( OUTPUT ${CMAKE_BINARY_DIR}/zypp/sqlite-schema.h PRE_BUILD COMMAND "${CMAKE_BINARY_DIR}/zypp/mkarray" ARGS "${CMAKE_SOURCE_DIR}/zypp/cache/schema/schema.sql" "schemaData" "${CMAKE_BINARY_DIR}/zypp/sqlite-schema.h" DEPENDS mkarray DEPENDS ${CMAKE_SOURCE_DIR}/zypp/cache/schema/schema.sql )
SET( zypp_SRCS
+ Arch.cc
Atom.cc
ByteCount.cc
+ Capabilities.cc
+ Capability.cc
CapMatch.cc
+ Changelog.cc
CheckSum.cc
+ CountryCode.cc
Date.cc
Dep.cc
Dependencies.cc
+ Digest.cc
+ DiskUsage.cc
+ DiskUsageCounter.cc
+ dummy.cc
Edition.cc
+ ExternalProgram.cc
+ Fetcher.cc
+ FileChecker.cc
+ IdString.cc
+ KeyRing.cc
Language.cc
- NVR.cc
+ LanguageCode.cc
+ Locale.cc
+ Locks.cc
+ MediaProducts.cc
+ MediaSetAccess.cc
+ Message.cc
+ NameKindProxy.cc
NVRA.cc
NVRAD.cc
+ NVR.cc
+ OnMediaLocation.cc
+ Package.cc
+ Patch.cc
+ PathInfo.cc
+ Pathname.cc
+ Pattern.cc
+ PoolItem.cc
+ ProblemSolution.cc
+ Product.cc
+ ProgressData.cc
+ ProvideFilePolicy.cc
+ PublicKey.cc
Range.cc
Rel.cc
+ RepoInfo.cc
+ RepoManager.cc
+ Repository.cc
+ RepoStatus.cc
+ ResKind.cc
ResObject.cc
Resolvable.cc
- ResStatus.cc
- ResStore.cc
- PoolItem.cc
- ResPool.cc
- NameKindProxy.cc
- ResPoolProxy.cc
Resolver.cc
ResolverProblem.cc
- ProblemSolution.cc
- Package.cc
- Pathname.cc
- ProgressData.cc
+ ResPool.cc
+ ResPoolProxy.cc
+ ResStatus.cc
+ ResStore.cc
+ Script.cc
+ Selection.cc
+ Signature.cc
SrcPackage.cc
SysContent.cc
Target.cc
- Selection.cc
- Pattern.cc
- Message.cc
- Script.cc
- Patch.cc
- Product.cc
- Changelog.cc
- ExternalProgram.cc
- PathInfo.cc
- Digest.cc
- Url.cc
TmpPath.cc
- DiskUsage.cc
- DiskUsageCounter.cc
- VendorAttr.cc
+ TranslatedText.cc
UpgradeStatistics.cc
+ Url.cc
+ VendorAttr.cc
+ ZConfig.cc
ZYpp.cc
ZYppCommitPolicy.cc
ZYppCommitResult.cc
- TranslatedText.cc
ZYppFactory.cc
- PublicKey.cc
- Signature.cc
- KeyRing.cc
- MediaSetAccess.cc
- ProvideFilePolicy.cc
- OnMediaLocation.cc
- Fetcher.cc
- FileChecker.cc
- Repository.cc
- RepoInfo.cc
- RepoStatus.cc
- RepoManager.cc
- MediaProducts.cc
- Locks.cc
- ResKind.cc
- ZConfig.cc
- Arch.cc
- LanguageCode.cc
- CountryCode.cc
- Locale.cc
)
SET( zypp_HEADERS
- ZConfig.h
Arch.h
Atom.h
AutoDispose.h
Bit.h
ByteCount.h
Callback.h
+ Capabilities.h
+ Capability.h
CapAndItem.h
CapFilters.h
CapMatch.h
@@ -101,56 +106,65 @@
CheckSum.h
CountryCode.h
Date.h
- Dep.h
Dependencies.h
+ Dep.h
Digest.h
- DiskUsage.h
DiskUsageCounter.h
+ DiskUsage.h
Edition.h
ExternalProgram.h
Fetcher.h
- KVMap.h
+ FileChecker.h
+ IdString.h
+ IdStringType.h
KeyRing.h
- Language.h
+ KVMap.h
LanguageCode.h
+ Language.h
Locale.h
+ Locks.h
ManagedFile.h
+ MediaProducts.h
MediaSetAccess.h
Message.h
- NVR.h
- NVRA.h
- NVRAD.h
NameKindProxy.h
NeedAType.h
+ NVRAD.h
+ NVRA.h
+ NVR.h
OnMediaLocation.h
Package.h
PackageKeyword.h
Patch.h
PathInfo.h
Pathname.h
- ProgressData.h
Pattern.h
PoolItem.h
ProblemSolution.h
ProblemTypes.h
Product.h
+ ProgressData.h
ProvideFilePolicy.h
PublicKey.h
Range.h
- Rel.h
RelCompare.h
- ResKind.h
+ Rel.h
+ RepoInfo.h
+ RepoManager.h
+ Repository.h
+ RepoStatus.h
ResFilters.h
+ ResKind.h
ResObject.h
ResObjects.h
+ Resolvable.h
+ Resolver.h
+ ResolverProblem.h
ResPool.h
ResPoolProxy.h
ResStatus.h
ResStore.h
ResTraits.h
- Resolvable.h
- Resolver.h
- ResolverProblem.h
Script.h
Selection.h
Signature.h
@@ -163,19 +177,13 @@
UpgradeStatistics.h
Url.h
VendorAttr.h
- ZYpp.h
+ ZConfig.h
ZYppCallbacks.h
ZYppCommit.h
ZYppCommitPolicy.h
ZYppCommitResult.h
ZYppFactory.h
- FileChecker.h
- Repository.h
- RepoInfo.h
- RepoStatus.h
- RepoManager.h
- MediaProducts.h
- Locks.h
+ ZYpp.h
)
INSTALL( FILES ${zypp_HEADERS} DESTINATION "${CMAKE_INSTALL_PREFIX}/include/zypp" )
@@ -530,26 +538,16 @@
)
SET( zypp_sat_SRCS
- sat/detail/PoolImpl.cc
sat/Pool.cc
sat/Repo.cc
sat/Solvable.cc
- IdString.cc
- Capability.cc
- Capabilities.cc
sat/SATResolver.cc
)
SET( zypp_sat_HEADERS
- sat/detail/PoolMember.h
- sat/detail/PoolImpl.h
sat/Pool.h
sat/Repo.h
sat/Solvable.h
- IdString.h
- IdStringType.h
- Capability.h
- Capabilities.h
sat/SATResolver.h
)
@@ -558,6 +556,21 @@
DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/sat
)
+SET( zypp_sat_detail_SRCS
+ sat/detail/PoolImpl.cc
+)
+
+SET( zypp_sat_detail_HEADERS
+ sat/detail/PoolMember.h
+ sat/detail/PoolImpl.h
+)
+
+INSTALL( FILES
+ ${zypp_sat_detail_HEADERS}
+ DESTINATION ${CMAKE_INSTALL_PREFIX}/include/zypp/sat/detail
+)
+
+
SET( zypp_target_SRCS
target/CommitLog.cc
target/CommitPackageCache.cc
@@ -878,6 +891,7 @@
${zypp_SRCS}
${zypp_zypp_detail_SRCS}
${zypp_sat_SRCS}
+${zypp_sat_detail_SRCS}
${zypp_base_SRCS}
)
@@ -900,6 +914,7 @@
${zypp_base_HEADERS}
${zypp_solver_detail_HEADERS}
${zypp_sat_HEADERS}
+${zypp_sat_detail_HEADERS}
${zypp_target_store_HEADERS}
${zypp_url_HEADERS}
${zypp_HEADERS}
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org