Partially fix up windows unit tests. Try out the Visual Studio Test Manager
This commit is contained in:
1 parent
dfdcbd5c85
commit
da1a36bf11
9 files changed
+33
-55
No files matched your search
@@ -171,37 +171,17 @@ void ConfigurationState::initialize_defaults()
|
||||
_is_initialized = true;
|
||||
}
|
||||
|
||||
|
||||
std::string get_installation(const std::string& path)
|
||||
{
|
||||
// "Installation" is defined as the directory where we are installed
|
||||
// "bin" is special cased to "" as a backwards compatibility for developers
|
||||
bts_assert(!path.empty());
|
||||
std::string parent_path = boost::filesystem::path(path).parent_path().string();
|
||||
size_t last = parent_path.find_last_of("/\\");
|
||||
if (last + 1 >= parent_path.size())
|
||||
return "";
|
||||
std::string installation = parent_path.substr(last + 1, parent_path.size() - last);
|
||||
if (installation == "bin")
|
||||
return "";
|
||||
return installation;
|
||||
}
|
||||
|
||||
void ConfigurationState::initialize_builtins()
|
||||
{
|
||||
System sys;
|
||||
|
||||
sys.set_host_name(os::host_name());
|
||||
sys.set_process_name(os::get_application_name());
|
||||
sys.set_process_path(os::get_application_path());
|
||||
sys.set_directory(os::get_install_path());
|
||||
sys.set_platform(os::platform_name());
|
||||
sys.set_qualifier(os::get_qualifier());
|
||||
sys.set_unittest_environment(utils::internal::is_unittest_environment());
|
||||
sys.set_data_path(os::bts_data_path());
|
||||
sys.set_installation(get_installation(sys.process_path()));
|
||||
sys.set_installation_specific_data_path(sys.data_path() + sys.installation() + "/");
|
||||
// sys.set_build_number(BUILD_NUMBER);
|
||||
sys.set_build_number(0);
|
||||
sys.set_os_user(os::username());
|
||||
#ifndef NDEBUG
|
||||
sys.set_build_type("debug");
|
||||
|
||||
Reference in new issue
Block a user