Commits

Darrell Schiebel authored 78b3043539c Merge
Merge pull request #8 in CASA/casaviewer from CAS-12669 to master

* commit '34a2028a2c0f8938be494e9f18ec6952e9ed3a31': changes for datapath argument (CAS-12669/CAS-13078) bamboo decided this ticket has had enough time (CAS-12669) change grpc unload(id) to accept a panel id (CAS-12669) substitute casaviewer exe to interpose valgrind (with logging to a file) (CAS-12669) prevent c-preprocessor skew with CASA6 and CASATOOLS defines; include casa-source valgrind fix (CAS-12669) set options from other side of grpc connection finalize first round of changes for interactive clean start adding interactivemask (CAS-12669) fix multiple defines of rpc.Id protocol for clean CAS-12669 track casa6 CAS-12669

scripts/casaviewer-w-valgrind

Added+x
1 +#!/usr/bin/perl
2 +use File::Basename;
3 +use Cwd 'abs_path';
4 +use Cwd 'getcwd';
5 +use POSIX qw(strftime);
6 +
7 +$scripts_dir = dirname(abs_path($0));
8 +$build_dir = abs_path("$scripts_dir/../build");
9 +$bin_dir = "";
10 +
11 +opendir( $BDH, $build_dir ) || die "Can't open $build_dir: $!";
12 +while ( readdir $BDH ) {
13 + if ( -d "$build_dir/$_" && m|^bin| ) {
14 + $bin_dir = "$build_dir/$_";
15 + }
16 +}
17 +die "could not find bin directory" unless $bin_dir;
18 +$binary = "$bin_dir/casaviewer.app/usr/bin/casaviewer";
19 +die "casaviewer executable not found" unless -e $binary;
20 +
21 +chomp($valgrind = `which valgrind`);
22 +die "could not find valgrind" unless -x $valgrind;
23 +$logfile = strftime("valgrind-%Y.%m.%d.log",localtime);
24 +splice( @ARGV, 1, 0, "--nofork" );
25 +@args = ( $valgrind, "--trace-children=yes", "--log-file=$logfile", $binary, @ARGV );
26 +exec { $args[0] } @args;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut