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.
Created attachment 444908 [details] [diff] [review] add Component.utils.purifyPrintf
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.
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.