1 // -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*-
2 // vim: ts=8 sw=2 smarttab
4 * Ceph - scalable distributed file system
6 * Copyright (C) 2011 New Dream Network
8 * This is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License version 2.1, as published by the Free Software
11 * Foundation. See file COPYING.
15 #include "systest_settings.h"
21 pthread_mutex_t g_system_test_settings_lock = PTHREAD_MUTEX_INITIALIZER;
23 SysTestSettings& SysTestSettings::
26 pthread_mutex_lock(&g_system_test_settings_lock);
28 m_inst = new SysTestSettings();
29 pthread_mutex_unlock(&g_system_test_settings_lock);
33 bool SysTestSettings::
39 std::string SysTestSettings::
40 get_log_name(const std::string &suffix) const
42 if (m_log_file_base.empty())
44 std::ostringstream oss;
45 oss << m_log_file_base << "." << suffix;
49 SysTestSettings* SysTestSettings::
55 m_use_threads = !!getenv("USE_THREADS");
56 const char *lfb = getenv("LOG_FILE_BASE");
58 m_log_file_base.assign(lfb);