1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

Refine utest

This commit is contained in:
winlin 2019-05-14 08:42:46 +08:00
parent 58561b9f76
commit 77cc148608
2 changed files with 11 additions and 4 deletions

View file

@ -29,6 +29,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <srs_app_config.hpp> #include <srs_app_config.hpp>
#include <srs_app_log.hpp> #include <srs_app_log.hpp>
// Temporary disk config.
std::string _srs_tmp_file_prefix = "/tmp/srs-utest-";
// Temporary network config.
std::string _srs_tmp_host = "127.0.0.1";
int _srs_tmp_port = 11935;
srs_utime_t _srs_tmp_timeout = (100 * SRS_UTIME_MILLISECONDS);
// kernel module. // kernel module.
ISrsLog* _srs_log = new MockEmptyLog(SrsLogLevelDisabled); ISrsLog* _srs_log = new MockEmptyLog(SrsLogLevelDisabled);
ISrsThreadContext* _srs_context = new ISrsThreadContext(); ISrsThreadContext* _srs_context = new ISrsThreadContext();

View file

@ -42,11 +42,11 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#define VOID #define VOID
// Temporary disk config. // Temporary disk config.
std::string _srs_tmp_file_prefix = "/tmp/srs-utest-"; extern std::string _srs_tmp_file_prefix;
// Temporary network config. // Temporary network config.
std::string _srs_tmp_host = "127.0.0.1"; extern std::string _srs_tmp_host;
int _srs_tmp_port = 11935; extern int _srs_tmp_port;
srs_utime_t _srs_tmp_timeout = (100 * SRS_UTIME_MILLISECONDS); extern srs_utime_t _srs_tmp_timeout;
// For errors. // For errors.
#define HELPER_EXPECT_SUCCESS(x) EXPECT_TRUE(srs_success == (err = x)); srs_freep(err) #define HELPER_EXPECT_SUCCESS(x) EXPECT_TRUE(srs_success == (err = x)); srs_freep(err)