Allow mochitest to inject name of running test into purify log

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
9 years ago
9 months ago

People

(Reporter: jgriffin, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Reporter)

Description

9 years ago
When running mochitest under purify, I need a way to inject the name of the currently running test into the purify log, so that I can associate purify errors with specific tests.  The purify log is not written in real time, and cannot be directed to stdout, so I cannot handle this by parsing the mochitest log.

This patch accomplishes this goal by adding a Component.utils.purifyPrintf() method.  This method does nothing unless --enable-purify is specified in mozconfig, in which case it call's purify's PurifyPrintf() function.  I call Component.utils.purifyPrintf() in SimpleTest/TestRunner.js in the same place the test start logging is currently performed.
(Reporter)

Comment 1

9 years ago
Created attachment 444908 [details] [diff] [review]
add Component.utils.purifyPrintf
Attachment #444908 - Flags: review?(ted.mielczarek)
(Reporter)

Comment 2

9 years ago
Harvey, can you given your opinion on checking two files into the tree?  They're both part of purify.  One explicitly has no copyright:

+ * Header file of Pure API function declarations.
+ *
+ * Explicitly no copyright.
+ * You may recompile and redistribute these definitions as required.

The other is copyrighted but may be redistributed freely:

+/*
+ * Header file of Pure API function declarations.
+ *
+* (C) Copyright IBM Corporation. 2006, 2006. All Rights Reserved.
+   *   You may recompile and redistribute these definitions as required.
Comment on attachment 444908 [details] [diff] [review]
add Component.utils.purifyPrintf

jgriffin and I talked about this on IRC. I'm not wild about this patch given the huge amount of support code just to enable this one function, so he's going to revisit it and see if there are other workarounds possible.
Attachment #444908 - Flags: review?(ted.mielczarek)
Mass closing mochitest bugs that haven't had activity in the past 5 years. Please re-open or file a new bug with modern context if this is still relevant.
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.