[Libva] [PATCH intel-driver 4/5] test: add getFullTestName to i965 test fixture
U. Artie Eoff
ullysses.a.eoff at intel.com
Wed Sep 7 20:43:37 UTC 2016
Add I965TestFixture::getFullTestName to allow tests to
log the current test's name.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff at intel.com>
---
test/i965_test_fixture.cpp | 9 +++++++++
test/i965_test_fixture.h | 3 +++
2 files changed, 12 insertions(+)
diff --git a/test/i965_test_fixture.cpp b/test/i965_test_fixture.cpp
index 56af0ab3ec97..d7f30c2ed4f3 100644
--- a/test/i965_test_fixture.cpp
+++ b/test/i965_test_fixture.cpp
@@ -45,6 +45,15 @@ I965TestFixture::~I965TestFixture()
m_vaDisplay = NULL;
}
+const std::string I965TestFixture::getFullTestName() const
+{
+ const ::testing::TestInfo * const info =
+ ::testing::UnitTest::GetInstance()->current_test_info();
+ return std::string(info->test_case_name())
+ + std::string(".")
+ + std::string(info->name());
+}
+
void I965TestFixture::initialize()
{
ASSERT_FALSE(NULL == (VADisplay)*this);
diff --git a/test/i965_test_fixture.h b/test/i965_test_fixture.h
index f80384810410..511c791fe9be 100644
--- a/test/i965_test_fixture.h
+++ b/test/i965_test_fixture.h
@@ -28,6 +28,7 @@
#include "test.h"
#include "i965_internal_decl.h"
+#include <string>
#include <vector>
typedef std::vector<VASurfaceID> Surfaces;
@@ -82,6 +83,8 @@ protected:
terminate();
}
+ const std::string getFullTestName() const;
+
public:
/**
* Initializes the i965 driver and display. May generate a fatal or
--
2.1.0
More information about the Libva
mailing list