Files
verilator/nodist/fuzzer/wrapper.cpp
T

25 lines
846 B
C++
Raw Normal View History

2019-10-16 22:18:35 -04:00
// -*- mode: C++; c-file-style: "cc-mode" -*-
//*************************************************************************
// DESCRIPTION: Verilator fuzzing wrapper for verilator_bin
//
// SPDX-FileCopyrightText: 2019 Eric Rippey
// SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
2019-10-16 22:18:35 -04:00
//*************************************************************************
#include <unistd.h>
#include <cstdlib>
#include <cassert>
// The purpose of this script is to make sure that the results folder that
// is generated by running verilator does not change the results of
// subsequent runs.
// This does slow down the execution to some degree but makes the results
// more reliable.
2019-10-29 22:57:25 -04:00
int main(int argc, char** argv, char** envp) {
2019-10-16 22:18:35 -04:00
auto r = system("rm -rf obj_dir");
2019-10-29 22:57:25 -04:00
assert(r == 0);
return execve("../../bin/verilator_bin", argv, envp);
2019-10-16 22:18:35 -04:00
}