summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-02-06 10:06:11 -0800
committerSteve Reinhardt <stever@eecs.umich.edu>2007-02-06 10:06:11 -0800
commit98ef836ca6a851c14b335603f75a2d728a897936 (patch)
treee52a1fe6a742e11ef3d49ea6b88e75704b967c81 /util
parent572addee5d261104c5817e24608ea0ae9c1d4c75 (diff)
downloadgem5-98ef836ca6a851c14b335603f75a2d728a897936.tar.xz
Use perl FindBin package to set path to rundiff to the
directory where tracediff is. --HG-- extra : convert_revision : f0cc0af264aa624cbacbf3ba42b6b64f90a8e759
Diffstat (limited to 'util')
-rwxr-xr-xutil/tracediff10
1 files changed, 6 insertions, 4 deletions
diff --git a/util/tracediff b/util/tracediff
index b25efe9b2..3633fdb48 100755
--- a/util/tracediff
+++ b/util/tracediff
@@ -1,5 +1,5 @@
#! /usr/bin/env perl
-# Copyright (c) 2003-2006 The Regents of The University of Michigan
+# Copyright (c) 2003-2007 The Regents of The University of Michigan
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -60,6 +60,8 @@
# run only).
#
+use FindBin;
+
if (@ARGV < 2) {
die "Usage: tracediff \"sim1|sim2\" [common-arg \"arg1|arg2\" ...]\n";
}
@@ -101,9 +103,9 @@ mkdir($dir2) or die "Can't create dir $dir2\n";
$cmd1 = "$sim1 -d $dir1 $args1 2>&1 |";
$cmd2 = "$sim2 -d $dir2 $args2 2>&1 |";
-# This only works if you have rundiff in your path. I just edit it
-# with an explicit path if necessary.
-$fullcmd = "rundiff '$cmd1' '$cmd2' 2>&1 > tracediff-$$.out";
+# Expect that rundiff is in the same dir as the tracediff script.
+# FindBin figures that out for us.
+$fullcmd = "$FindBin::Bin/rundiff '$cmd1' '$cmd2' 2>&1 > tracediff-$$.out";
print "Executing $fullcmd\n";
system($fullcmd);