19#ifndef BACKENDS_TOFINO_BF_P4C_TEST_GTEST_TOFINO_GTEST_UTILS_H_
20#define BACKENDS_TOFINO_BF_P4C_TEST_GTEST_TOFINO_GTEST_UTILS_H_
25#include "backends/tofino/bf-p4c/arch/arch.h"
26#include "backends/tofino/bf-p4c/bf-p4c-options.h"
27#include "backends/tofino/bf-p4c/device.h"
28#include "gtest/gtest.h"
29#include "lib/compile_context.h"
42const char *tna_header();
43const char *t2na_header();
47 static std::optional<MidendTestCase>
create(
const std::string &source);
58 static std::optional<TofinoPipeTestCase>
create(
const std::string &source);
63 const std::string &source);
A CompileContext for bf-p4c.
Definition bf-p4c-options.h:136
static void init(cstring name)
Definition device.cpp:28
A GTest fixture base class for backend targets.
Definition tofino_gtest_utils.h:73
A GTest fixture for JBay tests.
Definition tofino_gtest_utils.h:87
A GTest fixture for Tofino tests.
Definition tofino_gtest_utils.h:81
The namespace encapsulating Barefoot/Intel-specific stuff.
Definition add_t2na_meta.cpp:21
The namespace encapsulating IR node classes.
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24
Definition compile_context.h:77
Definition tofino_gtest_utils.h:45
const IR::P4Program * program
The output of the midend.
Definition tofino_gtest_utils.h:50
static std::optional< MidendTestCase > create(const std::string &source)
Create a test case that requires the frontend and the midend to run.
Definition tofino_gtest_utils.cpp:50
const IR::P4Program * frontendProgram
The output of the frontend.
Definition tofino_gtest_utils.h:53
Definition tofino_gtest_utils.h:56
const IR::BFN::Pipe * pipe
The output of extract_maupipe().
Definition tofino_gtest_utils.h:66
const IR::P4Program * frontendProgram
The output of the frontend.
Definition tofino_gtest_utils.h:69
static std::optional< TofinoPipeTestCase > create(const std::string &source)
Create a test case that requires extract_maupipe() to run.
Definition tofino_gtest_utils.cpp:75
static std::optional< TofinoPipeTestCase > createWithThreadLocalInstances(const std::string &source)
Definition tofino_gtest_utils.cpp:119