Allow unknown flags in test_main.cc.
Adds AllowCommandLineParsing to allow us to ignore "--no-sandbox" given by new TSanV2 bots. Not ignoring this flag prevents the test from running on this machine. Also removing unnecessary asserts that clutter code. BUG= TEST=Locally running video_engine_tests with --no-sandbox. R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2178004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4679 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
36439bf906
commit
7e1bf318bf
@ -10,59 +10,36 @@
|
||||
|
||||
#include "webrtc/video_engine/test/common/flags.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
#include "gflags/gflags.h"
|
||||
|
||||
namespace webrtc {
|
||||
namespace test {
|
||||
namespace flags {
|
||||
|
||||
bool flags_are_init = false;
|
||||
|
||||
void Init(int* argc, char*** argv) {
|
||||
assert(!flags_are_init);
|
||||
// AllowCommandLineParsing allows us to ignore flags passed on to us by
|
||||
// Chromium build bots without having to explicitly disable them.
|
||||
google::AllowCommandLineReparsing();
|
||||
google::ParseCommandLineFlags(argc, argv, true);
|
||||
|
||||
// stuff;
|
||||
flags_are_init = true;
|
||||
}
|
||||
|
||||
DEFINE_int32(width, 640, "Video width.");
|
||||
size_t Width() {
|
||||
assert(flags_are_init);
|
||||
return static_cast<size_t>(FLAGS_width);
|
||||
}
|
||||
size_t Width() { return static_cast<size_t>(FLAGS_width); }
|
||||
|
||||
DEFINE_int32(height, 480, "Video height.");
|
||||
size_t Height() {
|
||||
assert(flags_are_init);
|
||||
return static_cast<size_t>(FLAGS_height);
|
||||
}
|
||||
size_t Height() { return static_cast<size_t>(FLAGS_height); }
|
||||
|
||||
DEFINE_int32(fps, 30, "Frames per second.");
|
||||
int Fps() {
|
||||
assert(flags_are_init);
|
||||
return static_cast<int>(FLAGS_fps);
|
||||
}
|
||||
int Fps() { return static_cast<int>(FLAGS_fps); }
|
||||
|
||||
DEFINE_int32(min_bitrate, 50, "Minimum video bitrate.");
|
||||
size_t MinBitrate() {
|
||||
assert(flags_are_init);
|
||||
return static_cast<size_t>(FLAGS_min_bitrate);
|
||||
}
|
||||
size_t MinBitrate() { return static_cast<size_t>(FLAGS_min_bitrate); }
|
||||
|
||||
DEFINE_int32(start_bitrate, 300, "Video starting bitrate.");
|
||||
size_t StartBitrate() {
|
||||
assert(flags_are_init);
|
||||
return static_cast<size_t>(FLAGS_start_bitrate);
|
||||
}
|
||||
size_t StartBitrate() { return static_cast<size_t>(FLAGS_start_bitrate); }
|
||||
|
||||
DEFINE_int32(max_bitrate, 800, "Maximum video bitrate.");
|
||||
size_t MaxBitrate() {
|
||||
assert(flags_are_init);
|
||||
return static_cast<size_t>(FLAGS_max_bitrate);
|
||||
}
|
||||
size_t MaxBitrate() { return static_cast<size_t>(FLAGS_max_bitrate); }
|
||||
} // flags
|
||||
} // test
|
||||
} // webrtc
|
||||
|
Loading…
x
Reference in New Issue
Block a user