From: James Zern Date: Wed, 26 Jun 2013 00:53:20 +0000 (-0700) Subject: encode_test_driver: check for fatal failures X-Git-Tag: v1.3.0~1019^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1c05e9de2ca852d9e929696f53ab18063f4ef9c0;p=libvpx encode_test_driver: check for fatal failures Make the base test be: !(fatal || abort_) removing some redundancy in the encode tests Change-Id: I8ffaf33fcf9a3030b38ea3e8eb94704cdc2fc920 --- diff --git a/test/altref_test.cc b/test/altref_test.cc index 14af26574..af25b7285 100644 --- a/test/altref_test.cc +++ b/test/altref_test.cc @@ -33,10 +33,6 @@ class AltRefTest : public ::libvpx_test::EncoderTest, altref_count_ = 0; } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video, libvpx_test::Encoder *encoder) { if (video->frame() == 1) { diff --git a/test/borders_test.cc b/test/borders_test.cc index 49505ee66..7bfece81c 100644 --- a/test/borders_test.cc +++ b/test/borders_test.cc @@ -27,10 +27,6 @@ class BordersTest : public ::libvpx_test::EncoderTest, SetMode(GET_PARAM(1)); } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if ( video->frame() == 1) { diff --git a/test/config_test.cc b/test/config_test.cc index 90087280b..36c63302b 100644 --- a/test/config_test.cc +++ b/test/config_test.cc @@ -40,10 +40,6 @@ class ConfigTest : public ::libvpx_test::EncoderTest, ++frame_count_out_; } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - unsigned int frame_count_in_; unsigned int frame_count_out_; unsigned int frame_count_max_; diff --git a/test/cq_test.cc b/test/cq_test.cc index a6a4b8ebd..a2c829163 100644 --- a/test/cq_test.cc +++ b/test/cq_test.cc @@ -42,10 +42,6 @@ class CQTest : public ::libvpx_test::EncoderTest, n_frames_ = 0; } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video, libvpx_test::Encoder *encoder) { if (video->frame() == 1) { diff --git a/test/datarate_test.cc b/test/datarate_test.cc index 85eeafbcc..287e80584 100644 --- a/test/datarate_test.cc +++ b/test/datarate_test.cc @@ -36,10 +36,6 @@ class DatarateTest : public ::libvpx_test::EncoderTest, duration_ = 0.0; } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { const vpx_rational_t tb = video->timebase(); diff --git a/test/encode_test_driver.h b/test/encode_test_driver.h index 6aeb96b1f..dbdc33c8e 100644 --- a/test/encode_test_driver.h +++ b/test/encode_test_driver.h @@ -190,7 +190,9 @@ class EncoderTest { virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {} // Hook to determine whether the encode loop should continue. - virtual bool Continue() const { return !abort_; } + virtual bool Continue() const { + return !(::testing::Test::HasFatalFailure() || abort_); + } const CodecFactory *codec_; // Hook to determine whether to decode frame after encoding diff --git a/test/error_resilience_test.cc b/test/error_resilience_test.cc index ddfbd0fd8..d4a6967f6 100644 --- a/test/error_resilience_test.cc +++ b/test/error_resilience_test.cc @@ -50,10 +50,6 @@ class ErrorResilienceTest : public ::libvpx_test::EncoderTest, mismatch_nframes_ = 0; } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) { psnr_ += pkt->data.psnr.psnr[0]; nframes_++; diff --git a/test/keyframe_test.cc b/test/keyframe_test.cc index 85ca0b975..f7572e872 100644 --- a/test/keyframe_test.cc +++ b/test/keyframe_test.cc @@ -31,10 +31,6 @@ class KeyframeTest : public ::libvpx_test::EncoderTest, set_cpu_used_ = 0; } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, ::libvpx_test::Encoder *encoder) { if (kf_do_force_kf_) diff --git a/test/resize_test.cc b/test/resize_test.cc index 0d591ad87..7412a2417 100644 --- a/test/resize_test.cc +++ b/test/resize_test.cc @@ -70,10 +70,6 @@ class ResizeTest : public ::libvpx_test::EncoderTest, SetMode(GET_PARAM(1)); } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void DecompressedFrameHook(const vpx_image_t &img, vpx_codec_pts_t pts) { frame_info_list_.push_back(FrameInfo(pts, img.d_w, img.d_h)); diff --git a/test/superframe_test.cc b/test/superframe_test.cc index 062ec6c9e..d91e7b10b 100644 --- a/test/superframe_test.cc +++ b/test/superframe_test.cc @@ -33,10 +33,6 @@ class SuperframeTest : public ::libvpx_test::EncoderTest, delete[] modified_buf_; } - virtual bool Continue() const { - return !HasFatalFailure() && !abort_; - } - virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video, libvpx_test::Encoder *encoder) { if (video->frame() == 1) {