1#ifndef BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_PTF_H_
2#define BACKENDS_P4TOOLS_MODULES_TESTGEN_TARGETS_BMV2_TEST_BACKEND_PTF_H_
12#include <inja/inja.hpp>
16#include "lib/cstring.h"
18#include "backends/p4tools/modules/testgen/lib/test_object.h"
19#include "backends/p4tools/modules/testgen/lib/test_spec.h"
20#include "backends/p4tools/modules/testgen/targets/bmv2/test_backend/common.h"
31 float currentCoverage)
override;
35 bool preambleEmitted =
false;
38 std::ofstream ptfFileStream;
49 void emitTestcase(
const TestSpec *testSpec,
cstring selectedBranches,
size_t testId,
50 const std::string &testCase,
float currentCoverage);
53 static std::string getTestCaseTemplate();
55 inja::json getExpectedPacket(
const TestSpec *testSpec)
const override;
59 static std::vector<std::pair<size_t, size_t>> getIgnoreMasks(
const IR::Constant *mask);