Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Add new entry in Release_Notes.
[simgrid.git] / tools / cmake / scripts / my_valgrind.pl
1 #!/usr/bin/env perl
2
3 # Copyright (c) 2012-2023. The SimGrid Team. All rights reserved.
4
5 # This program is free software; you can redistribute it and/or modify it
6 # under the terms of the license (GNU LGPL) which comes with this package.
7
8 use strict;
9 use warnings;
10
11 # Many other parameters (such as trace-children) are set in Tests.cmake
12 my @argv = ("valgrind", "--quiet");
13 my $count = 0;
14
15 while (defined(my $arg = shift)) {
16 #    print "arg($count)$arg\n";
17     if ($arg =~ m!/smpirun$!) {
18         @argv = ( $arg, "-keep-temps", "-quiet", "-wrapper", "@argv" );
19     } elsif ($arg eq "--cd") {
20         $arg = shift;
21         print "cd $arg\n";
22         chdir ($arg);
23         $count++;
24     } else {
25         push @argv, $arg;
26     }
27     $count++;
28 }
29
30 # print "COMMAND:";
31 # map { print "$_ " } @argv;
32 # print "\n";
33
34 exec @argv;