1#!/usr/bin/env perl
2if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
3# DESCRIPTION: Verilator: Verilog Test driver/expect definition
4#
5# Copyright 2003 by Wilson Snyder. This program is free software; you
6# can redistribute it and/or modify it under the terms of either the GNU
7# Lesser General Public License Version 3 or the Perl Artistic License
8# Version 2.0.
9# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
10
11scenarios(vltmt => 1);
12
13# It doesn't really matter what test
14top_filename("t/t_gen_alw.v");
15
16compile(
17    v_flags2 => ["--prof-threads --threads 2"]
18    );
19
20execute(
21    all_run_flags => ["+verilator+prof+threads+start+0",
22                      " +verilator+prof+threads+file+/dev/null",
23                      " +verilator+prof+vlt+file+$Self->{obj_dir}/profile.vlt",
24                      ],
25    check_finished => 1,
26    );
27
28file_grep("$Self->{obj_dir}/profile.vlt", qr/profile_data/i);
29
30compile(
31    # Intentinally no --prof-threads here, so we make sure profile data
32    # can read in without it (that is no prof-thread effect on profile_data hash names)
33    v_flags2 => ["--threads 2",
34                 " $Self->{obj_dir}/profile.vlt"],
35    );
36
37execute(
38    check_finished => 1,
39    );
40
41ok(1);
421;
43