1#ifndef NXDK_PGRAPH_TESTS_TEST_SUITE_H
2#define NXDK_PGRAPH_TESTS_TEST_SUITE_H
14#include "pgraph_diff_token.h"
29 bool enable_pgraph_region_diff;
35 std::shared_ptr<FTPLogger> ftp_logger;
41 bool interactive_only =
false);
44 [[nodiscard]]
const std::string &Name()
const {
return suite_name_; };
58 void DisableTests(
const std::set<std::string> &tests_to_skip);
60 [[nodiscard]] std::vector<std::string> TestNames()
const;
61 [[nodiscard]]
bool HasEnabledTests()
const {
return !tests_.empty(); };
63 void Run(
const std::string &test_name);
69 void RunAll(
bool inclue_interactive);
71 [[nodiscard]]
bool IsInteractiveOnly()
const {
return interactive_only_; }
72 void SetSavingAllowed(
bool enable =
true) { allow_saving_ = enable; }
78 void SetDefaultTextureFormat()
const;
82 void FinishDraw(
const std::string &name,
bool save_zbuffer =
false) {
83 host_.
FinishDraw(allow_saving_, output_dir_, suite_name_, name, save_zbuffer);
86 void FinishDrawNoSave(
const std::string &name,
bool save_zbuffer =
false) {
87 host_.
FinishDraw(
false, output_dir_, suite_name_, name, save_zbuffer);
91 std::chrono::steady_clock::time_point LogTestStart(
const std::string &test_name);
92 long LogTestEnd(
const std::string &test_name,
const std::chrono::steady_clock::time_point &start_time)
const;
96 std::string output_dir_;
97 std::string suite_name_;
100 bool interactive_only_;
103 bool allow_saving_{
true};
106 std::map<std::string, std::function<void()>> tests_{};
107 std::set<std::string> interactive_only_tests_{};
111 bool enable_progress_log_;
112 bool enable_pgraph_region_diff_;
113 uint32_t delay_milliseconds_between_tests_;
115 std::shared_ptr<FTPLogger> ftp_logger_;
Definition test_host.h:33
void FinishDraw(bool allow_saving, const std::string &output_directory, const std::string &suite_name, const std::string &name, bool save_zbuffer=false)
Marks drawing as completed, potentially causing artifacts (framebuffer, z/stencil-buffer) to be saved...
Definition test_host.cpp:200
Definition test_suite.h:21
virtual void Initialize()
Called to initialize the test suite.
Definition test_suite.cpp:122
virtual void Deinitialize()
Called to tear down the test suite.
Definition test_suite.cpp:344
void RunAll(bool inclue_interactive)
Definition test_suite.cpp:101
virtual void TearDownTest()
Called after running an individual test within this suite.
Definition test_suite.cpp:352
static void TagNV2ATrace(uint32_t num_nops)
Inserts a pattern of NV097_NO_OPERATION's into the pushbuffer to allow identification when viewing nv...
Definition test_suite.cpp:335
void FinishDraw(const std::string &name, bool save_zbuffer=false)
Definition test_suite.h:82
virtual void SetupTest()
Called before running an individual test within this suite.
Definition test_suite.cpp:350
Definition pgraph_diff_token.h:6
Runtime configuration for TestSuites.
Definition test_suite.h:24
bool enable_progress_log
Enable logging of test progress to file.
Definition test_suite.h:26
uint32_t delay_milliseconds_between_tests
Artificial delay before starting each test.
Definition test_suite.h:32