I want to test a C code under valgrind with different option. And I want to be able to capture all the outputs and report test success/fail depending on the result of those runs. Initially I thought of perl module Test::Valgrind but was not able to use it. Is there any other option to do this?
Asked
Active
Viewed 144 times
0
-
"*... but was not able to use it.*" If this is the problem, you should tag this question [perl], but [c] and tell us more about it. – alk Dec 04 '13 at 07:45
-
my question is if there are any other ways to fetch valgrind output into code written in any programming language. – Pritesh Acharya Dec 04 '13 at 07:47
-
do you mean using python script? – Pritesh Acharya Dec 04 '13 at 08:04
1 Answers
0
Nearly all available languages provide means of capturing output of external program runs.
- C:
popen
,pclose
- pipe stream to or from a process - Perl: backticks (``) operator or
open
function - executing external commands - Python: see Pipe subprocess standard output to a variable