473,378 Members | 1,441 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

C Source Code Generator For Test Cases

Hi,

Can anyone recommend a good method of using python to generate c
source code? I have tables of test cases to use as input to a
process which would generate the test's source code. The Cheetah tool
looks interesting. Has anyone used it? Any other suggestions?

TIA,
-T

Sep 28 '07 #1
6 1935
gamename wrote:
Hi,

Can anyone recommend a good method of using python to generate c
source code? I have tables of test cases to use as input to a
process which would generate the test's source code. The Cheetah tool
looks interesting. Has anyone used it? Any other suggestions?
How about using c-types to access your C-stuff to test, and use python + the
testcase-tables to invoke that?

Diez
Sep 28 '07 #2
>
How about using c-types to access your C-stuff to test, and use python + the
testcase-tables to invoke that?
Sure, that's possible. But the source code for tests (once all the
parms are read)
still needs to be generated. Calling the lib from python or from C,
there still
needs to be a way to generate 100+ test routines. ;-)

-T

Sep 28 '07 #3
On Fri, 28 Sep 2007 12:57:49 -0700, gamename wrote:
>How about using c-types to access your C-stuff to test, and use python + the
testcase-tables to invoke that?

Sure, that's possible. But the source code for tests (once all the
parms are read)
still needs to be generated. Calling the lib from python or from C,
there still
needs to be a way to generate 100+ test routines. ;-)
Instead of reading the testcase tables and generating source for test
routines you simply can do the tests right away.

Ciao,
Marc 'BlackJack' Rintsch
Sep 29 '07 #4
Instead of reading the testcase tables and generating source for test
routines you simply can do the tests right away.
Can't. :( This is for an embedded system. I need to create source
(in C) on one machine and then compile on others. The only thing that
I can be certain of is an ANSI compiler on any machine I use.

-T

Sep 29 '07 #5
On Sep 28, 1:48 pm, gamename <namesagame-use...@yahoo.comwrote:
Hi,

Can anyone recommend a good method of using python to generate c
source code? I have tables of test cases to use as input to a
process which would generate the test's source code. The Cheetah tool
looks interesting. Has anyone used it? Any other suggestions?

TIA,
-T
You might want to look at COG (http://www.nedbatchelder.com/code/
cog/). It might be helpful to you. I really enjoy using it and keep
finding things to use it with.

Good luck.

Mike

Oct 1 '07 #6
You might want to look at COG (http://www.nedbatchelder.com/code/
cog/). It might be helpful to you. I really enjoy using it and keep
finding things to use it with.
Thanks Mike. I agree. COG looks really promising.

-T

Oct 3 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike | last post by:
I need to be able to store a list of schedulable items, either regular callables or generator-producing functions -- is there a way to test if a fn is generator-producing? (In the non-generator...
14
by: Dave Murray | last post by:
New to Python question, why does this fail? Thanks, Dave ---testcase.py--- import sys, urllib, htmllib def Checkit(URL): try: print "Opening", URL
7
by: aurora | last post by:
I love generator and I use it a lot. Lately I've been writing some recursive generator to traverse tree structures. After taking closer look I have some concern on its performance. Let's take...
11
by: Lues | last post by:
Hi, I'm trying to protect some data in tables with encription (you know why, don't you ;)) I must confess that I'm not very expirienced in writing code, especially encription code. Can any...
8
by: Jon Paul Jones | last post by:
For some time now, I have been looking for a build system for ASP.NET that will merge the file based ease of deployment of classic ASP with the type saftey and prebuilt nature of ASP.NET with...
41
by: Petr Jakes | last post by:
Hello, I am trying to study/understand OOP principles using Python. I have found following code http://tinyurl.com/a4zkn about FSM (finite state machine) on this list, which looks quite useful for...
3
by: joshblair | last post by:
Hello, Has anyone ever seen or created such a code generator? I'm looking for a sample of a code generator that will generate code (preferably one that uses C# and the XMLTextWriter) to create...
100
by: jacob navia | last post by:
Recently, a heated debate started because of poor mr heathfield was unable to compile a program with // comments. Here is a utility for him, so that he can (at last) compile my programs :-) ...
31
by: smachin1000 | last post by:
Hi All, Does anyone know of a tool that can automatically analyze C source to remove unused #includes? Thanks, Sean
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.