Tim Landscheidt has submitted this change and it was merged.

Change subject: Don't call log-command-invocation when testing jsub
......................................................................


Don't call log-command-invocation when testing jsub

Detect when jsub is being run under a test harness and skip calls to
log-command-invocation which is not provided by this package.

Bug: T124618
Change-Id: Ie5a4997c420741ce3ade3bfdbe51c54e92985093
---
M debian/changelog
M jobutils/bin/jsub
2 files changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Tim Landscheidt: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/debian/changelog b/debian/changelog
index 171ba64..06f1bd4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+toollabs (1.9~dev) unstable; urgency=medium
+
+  * Don't call log-command-invocation when testing jsub. [Bryan Davis]
+
+ -- Tim Landscheidt <[email protected]>  Mon, 25 Jan 2016 14:24:33 +0000
+
 toollabs (1.8.1) unstable; urgency=medium
 
   * Stop logging for `job` - too much noise
diff --git a/jobutils/bin/jsub b/jobutils/bin/jsub
index 9102db2..317c2ed 100755
--- a/jobutils/bin/jsub
+++ b/jobutils/bin/jsub
@@ -23,7 +23,7 @@
 
 # Log this command invocation to EventLogging
 my $full_commandline = join " ", $0, @ARGV;
-system('/usr/local/bin/log-command-invocation', 'jsub', $full_commandline);
+system('/usr/local/bin/log-command-invocation', 'jsub', $full_commandline) 
unless (exists ($ENV {'JOBUTILS_QSUB'}));
 
 my %qsubargs = (
        '-a' => 1, '-b' => 1, '-cwd' => 0, '-e' => 1, '-hard' => 0, '-i' => 1, 
'-j' => 1,

-- 
To view, visit https://gerrit.wikimedia.org/r/266166
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5a4997c420741ce3ade3bfdbe51c54e92985093
Gerrit-PatchSet: 3
Gerrit-Project: labs/toollabs
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Merlijn van Deen <[email protected]>
Gerrit-Reviewer: Tim Landscheidt <[email protected]>
Gerrit-Reviewer: Yuvipanda <[email protected]>
Gerrit-Reviewer: coren <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to