diff --git a/docs/CONTRIBUTORS b/docs/CONTRIBUTORS index 7a5f72934..0c3be357f 100644 --- a/docs/CONTRIBUTORS +++ b/docs/CONTRIBUTORS @@ -44,6 +44,7 @@ HyungKi Jeong Iru Cai Ivan Vnučec Iztok Jeras +Jake Merdich James Hanlon James Hutchinson James Pallister diff --git a/test_regress/t/t_ccache_report.pl b/test_regress/t/t_ccache_report.pl index a17c2b02e..790bbf9f0 100755 --- a/test_regress/t/t_ccache_report.pl +++ b/test_regress/t/t_ccache_report.pl @@ -13,36 +13,37 @@ scenarios(vlt => 1); if (!$Self->cfg_with_ccache) { skip("Requires configuring with ccache"); } +else { + top_filename("t_a1_first_cc.v"); -top_filename("t_a1_first_cc.v"); + # This test requires rebuilding the object files to check the ccache log + foreach my $filename (glob("$Self->{obj_dir}/*.o")) { + print "rm $filename\n" if $Self->{verbose}; + unlink $filename; + } -# This test requires rebuilding the object files to check the ccache log -foreach my $filename (glob("$Self->{obj_dir}/*.o")) { - print "rm $filename\n" if $Self->{verbose}; - unlink $filename; + compile( + verilator_flags2 => ['--trace'], + make_flags => "ccache-report" + ); + + my $report = "$Self->{obj_dir}/$Self->{VM_PREFIX}__ccache_report.txt"; + + # We do not actually want to make this test depend on whether the file was + # cached or not, so trim the report to ignore actual caching behaviour + run(cmd => ["sed", "-i", "-e", "'s/ : .*/ : IGNORED/; /|/s/.*/IGNORED/;'", $report]); + files_identical($report, "t/$Self->{name}__ccache_report_initial.out"); + + # Now rebuild again (should be all up to date) + run( + logfile => "$Self->{obj_dir}/rebuild.log", + cmd => ["make", "-C", $Self->{obj_dir}, + "-f", "$Self->{VM_PREFIX}.mk", + $Self->{VM_PREFIX}, "ccache-report"] + ); + + files_identical($report, "t/$Self->{name}__ccache_report_rebuild.out"); } -compile( - verilator_flags2 => ['--trace'], - make_flags => "ccache-report" - ); - -my $report = "$Self->{obj_dir}/$Self->{VM_PREFIX}__ccache_report.txt"; - -# We do not actually want to make this test depend on whether the file was -# cached or not, so trim the report to ignore actual caching behaviour -run(cmd => ["sed", "-i", "-e", "'s/ : .*/ : IGNORED/; /|/s/.*/IGNORED/;'", $report]); -files_identical($report, "t/$Self->{name}__ccache_report_initial.out"); - -# Now rebuild again (should be all up to date) -run( - logfile => "$Self->{obj_dir}/rebuild.log", - cmd => ["make", "-C", $Self->{obj_dir}, - "-f", "$Self->{VM_PREFIX}.mk", - $Self->{VM_PREFIX}, "ccache-report"] - ); - -files_identical($report, "t/$Self->{name}__ccache_report_rebuild.out"); - ok(1); 1;