summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorU. Artie Eoff <ullysses.a.eoff@intel.com>2016-09-07 13:43:37 -0700
committerSean V Kelley <seanvk@posteo.de>2016-09-08 15:21:47 -0700
commit9d70bdd4087d9886e935cf9efa5f4511ac86600d (patch)
tree03774f6467cef59fa68cd8c5d642f489e15e41d3 /test
parentac0b762e70268063a6e55ae7aa85734b1562af6d (diff)
test: add getFullTestName to i965 test fixture
Add I965TestFixture::getFullTestName to allow tests to log the current test's name. Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com> Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Diffstat (limited to 'test')
-rw-r--r--test/i965_test_fixture.cpp9
-rw-r--r--test/i965_test_fixture.h3
2 files changed, 12 insertions, 0 deletions
diff --git a/test/i965_test_fixture.cpp b/test/i965_test_fixture.cpp
index 56af0ab..d7f30c2 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 f803848..511c791 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