simplectest-develop Mailing List for Simple C++ Testing Framework
Brought to you by:
jevonwright
You can subscribe to this list here.
| 2011 |
Jan
|
Feb
(3) |
Mar
(32) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Jevon W. <je...@je...> - 2011-03-15 04:52:02
|
Hi Michael,
'name' and 'reason' are used, but perhaps they are not used in your
particular test. That is, TEST(x) modifies 'reason' and START_TEST(x)
modifies 'name'. Can you post your code that is giving you the
warnings?
(Also sent to simplectest-developers mailing list.)
Cheers
Jevon
On Sat, Mar 12, 2011 at 4:13 AM, Michael Gasanenko <ml...@ya...> wrote:
> I am getting
> warning: ‘name’ is used uninitialized in this function
> on the line containing only
> END_TESTS()
>
> As I understand, name and reason are not used at all.
> I would delete them, unless you can remember something.
>
> #define START_TESTS() \
> int main(void) { \
> int fails = 0; \
> int tests = 0; \
> int testfails = 0; \
> int passes = 0; \
> char *name; \
> char *reason = NULL; \
> char info[80]; \
> double epsilon; \
> int continueTests = 1; \
> SET_EPSILON_DEFAULT(); \
> sprintf(info, " ");
>
> #define END_TESTS() \
> name = name; \
> reason = reason; \
> info[0] = info[0]; \
> printf("\n--- Results ---\n"); \
> printf("Tests run:%5d\n", tests); \
> printf("Passes: %5d\n", passes); \
> printf("Failures: %5d\n", fails); \
> return fails; \
> }
>
> #define SUITE(x) \
> if (continueTests) { \
> int fails_##x = 0; \
> int tests_##x = 0; \
> int testfails_##x = 0; \
> int passes_##x = 0; \
> continueTests = test_suite_##x(fails_##x, tests_##x, testfails_##x, passes_##x); \
> fails += fails_##x; \
> tests += tests_##x; \
> testfails += testfails_##x; \
> passes += passes_##x; \
> }
>
>
>
>
|
|
From: <ml...@us...> - 2011-03-11 14:48:10
|
Revision: 36
http://simplectest.svn.sourceforge.net/simplectest/?rev=36&view=rev
Author: mlg7
Date: 2011-03-11 14:48:04 +0000 (Fri, 11 Mar 2011)
Log Message:
-----------
the TUP example project works; added description of Tupfile to read.me
Modified Paths:
--------------
trunk/aux-shared/hello-test/read.me
Modified: trunk/aux-shared/hello-test/read.me
===================================================================
--- trunk/aux-shared/hello-test/read.me 2011-03-11 14:30:11 UTC (rev 35)
+++ trunk/aux-shared/hello-test/read.me 2011-03-11 14:48:04 UTC (rev 36)
@@ -20,6 +20,8 @@
Makefile -- a Makefile, basically borrowed from some "Hello, Makefile" article in the 'net, namely,
http://forum.ubuntu.ru/index.php?topic=100976.0 (you may need google translation to read it)
SConstruct -- a Scons build script
+Tupfile -- analog of Makefile for the TUP build system (one Tupfile per output directory)
+Tuprules.tup -- included by Tupfile-s
tests/neg.cpp -- a test suite
tests/pos.cpp -- another test suite
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-11 14:30:17
|
Revision: 35
http://simplectest.svn.sourceforge.net/simplectest/?rev=35&view=rev
Author: mlg7
Date: 2011-03-11 14:30:11 +0000 (Fri, 11 Mar 2011)
Log Message:
-----------
now works with tup
Modified Paths:
--------------
trunk/examples/tup/Tupfile
trunk/examples/tup/maincpp/Tupfile
trunk/examples/tup/tests/Tupfile
Added Paths:
-----------
trunk/examples/tup/Tuprules.tup
trunk/examples/tup/tests/maintest.c00
Modified: trunk/examples/tup/Tupfile
===================================================================
--- trunk/examples/tup/Tupfile 2011-03-10 15:03:17 UTC (rev 34)
+++ trunk/examples/tup/Tupfile 2011-03-11 14:30:11 UTC (rev 35)
@@ -1,5 +1,5 @@
-sources_cpp = add.cpp sub.cpp
+include_rules
-: foreach $(sources_cpp) |> g++ -c %f -o %o |> %B.o {objs}
-: {objs} maincpp/*.o |> g++ %f -o %o |> main
+: foreach *.cpp |> !cxx |> %B.o {objs}
+: {objs} maincpp/*.o |> !link |> main
Added: trunk/examples/tup/Tuprules.tup
===================================================================
--- trunk/examples/tup/Tuprules.tup (rev 0)
+++ trunk/examples/tup/Tuprules.tup 2011-03-11 14:30:11 UTC (rev 35)
@@ -0,0 +1,6 @@
+
+root_sources_cpp = add.cpp sub.cpp
+
+!cxx = |> g++ -Wall -Wextra -c %f -o %o |>
+!link = |> g++ %f -o %o |>
+
Modified: trunk/examples/tup/maincpp/Tupfile
===================================================================
--- trunk/examples/tup/maincpp/Tupfile 2011-03-10 15:03:17 UTC (rev 34)
+++ trunk/examples/tup/maincpp/Tupfile 2011-03-11 14:30:11 UTC (rev 35)
@@ -1,2 +1,2 @@
-
-: main.cpp |> g++ -c %f -o %o |> %B.o
+include_rules
+: main.cpp |> !cxx |> %B.o
Modified: trunk/examples/tup/tests/Tupfile
===================================================================
--- trunk/examples/tup/tests/Tupfile 2011-03-10 15:03:17 UTC (rev 34)
+++ trunk/examples/tup/tests/Tupfile 2011-03-11 14:30:11 UTC (rev 35)
@@ -1,5 +1,5 @@
-
+include_rules
: maintest.c00 |> cp %f %o; ../genmaintest.py %o *.cpp |> generated.maintest.cpp
-: foreach *.cpp |> g++ -c %f -o %o |> %B.o
-: *.o ../*.o |> g++ %f -o %o |> test
+: foreach *.cpp |> !cxx |> %B.o
+: *.o ../*.o |> !link |> test
Added: trunk/examples/tup/tests/maintest.c00
===================================================================
--- trunk/examples/tup/tests/maintest.c00 (rev 0)
+++ trunk/examples/tup/tests/maintest.c00 2011-03-11 14:30:11 UTC (rev 35)
@@ -0,0 +1,17 @@
+/* Generated by genmaintest.py */
+/* You MAY edit this file, but genmaintest.py will */
+/* automatically update test suite declarations and invocations. */
+/* The Simplectest site is http://simplectest.sf.net/ */
+#include "tests.h"
+#include <stdio.h>
+
+/* declarations{ */
+// to be replaced by the script
+/* }declarations */
+START_TESTS()
+printf("manually added message\n");
+/* invocations{ */
+// to be replaced by the script
+/* }invocations */
+END_TESTS()
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-10 15:03:23
|
Revision: 34
http://simplectest.svn.sourceforge.net/simplectest/?rev=34&view=rev
Author: mlg7
Date: 2011-03-10 15:03:17 +0000 (Thu, 10 Mar 2011)
Log Message:
-----------
changed attributes of tup/; the other files are in intermediate state (svn just commits them along with the directory)
Modified Paths:
--------------
trunk/examples/tup/Tupfile
trunk/examples/tup/tests/Tupfile
Added Paths:
-----------
trunk/examples/tup/maincpp/
trunk/examples/tup/maincpp/Tupfile
trunk/examples/tup/maincpp/main.cpp
Property Changed:
----------------
trunk/examples/tup/
Property changes on: trunk/examples/tup
___________________________________________________________________
Modified: svn:externals
- ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests/pos.cpp tests/pos.cpp
../../aux-shared/hello-test/tests/neg.cpp tests/neg.cpp
../../aux-shared/hello-test/main.cpp main.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
+ ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests/pos.cpp tests/pos.cpp
../../aux-shared/hello-test/tests/neg.cpp tests/neg.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
Modified: trunk/examples/tup/Tupfile
===================================================================
--- trunk/examples/tup/Tupfile 2011-03-07 12:11:57 UTC (rev 33)
+++ trunk/examples/tup/Tupfile 2011-03-10 15:03:17 UTC (rev 34)
@@ -1 +1,5 @@
-#not yet implemented
+
+sources_cpp = add.cpp sub.cpp
+
+: foreach $(sources_cpp) |> g++ -c %f -o %o |> %B.o {objs}
+: {objs} maincpp/*.o |> g++ %f -o %o |> main
Added: trunk/examples/tup/maincpp/Tupfile
===================================================================
--- trunk/examples/tup/maincpp/Tupfile (rev 0)
+++ trunk/examples/tup/maincpp/Tupfile 2011-03-10 15:03:17 UTC (rev 34)
@@ -0,0 +1,2 @@
+
+: main.cpp |> g++ -c %f -o %o |> %B.o
Added: trunk/examples/tup/maincpp/main.cpp
===================================================================
--- trunk/examples/tup/maincpp/main.cpp (rev 0)
+++ trunk/examples/tup/maincpp/main.cpp 2011-03-10 15:03:17 UTC (rev 34)
@@ -0,0 +1,9 @@
+#include <stdio.h>
+#include "../add.h"
+#include "../sub.h"
+int main()
+{
+ printf("add(2,3)=%x\n",add(2,3));
+ printf("sub(2,3)=%x\n",sub(2,3));
+ return 0;
+}
Modified: trunk/examples/tup/tests/Tupfile
===================================================================
--- trunk/examples/tup/tests/Tupfile 2011-03-07 12:11:57 UTC (rev 33)
+++ trunk/examples/tup/tests/Tupfile 2011-03-10 15:03:17 UTC (rev 34)
@@ -1 +1,5 @@
-#not yet implemented
+
+: maintest.c00 |> cp %f %o; ../genmaintest.py %o *.cpp |> generated.maintest.cpp
+: foreach *.cpp |> g++ -c %f -o %o |> %B.o
+: *.o ../*.o |> g++ %f -o %o |> test
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 12:12:03
|
Revision: 33
http://simplectest.svn.sourceforge.net/simplectest/?rev=33&view=rev
Author: mlg7
Date: 2011-03-07 12:11:57 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
fixing examples/tup/ properties
Property Changed:
----------------
trunk/examples/tup/
Property changes on: trunk/examples/tup
___________________________________________________________________
Modified: svn:externals
- ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests tests
../../aux-shared/hello-test/main.cpp main.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
+ ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests/pos.cpp tests/pos.cpp
../../aux-shared/hello-test/tests/neg.cpp tests/neg.cpp
../../aux-shared/hello-test/main.cpp main.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 12:06:15
|
Revision: 32
http://simplectest.svn.sourceforge.net/simplectest/?rev=32&view=rev
Author: mlg7
Date: 2011-03-07 12:06:09 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
added the directory for a Tup example, but have not yet implemented it
Added Paths:
-----------
trunk/examples/tup/
trunk/examples/tup/Tupfile
trunk/examples/tup/tests/
trunk/examples/tup/tests/Tupfile
Property changes on: trunk/examples/tup
___________________________________________________________________
Added: svn:externals
+ ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests tests
../../aux-shared/hello-test/main.cpp main.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
Added: trunk/examples/tup/Tupfile
===================================================================
--- trunk/examples/tup/Tupfile (rev 0)
+++ trunk/examples/tup/Tupfile 2011-03-07 12:06:09 UTC (rev 32)
@@ -0,0 +1 @@
+#not yet implemented
Added: trunk/examples/tup/tests/Tupfile
===================================================================
--- trunk/examples/tup/tests/Tupfile (rev 0)
+++ trunk/examples/tup/tests/Tupfile 2011-03-07 12:06:09 UTC (rev 32)
@@ -0,0 +1 @@
+#not yet implemented
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 11:36:46
|
Revision: 31
http://simplectest.svn.sourceforge.net/simplectest/?rev=31&view=rev
Author: mlg7
Date: 2011-03-07 11:36:40 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
added a note about "svn update --ignore-externals"
Modified Paths:
--------------
trunk/examples/svn_readme.txt
Modified: trunk/examples/svn_readme.txt
===================================================================
--- trunk/examples/svn_readme.txt 2011-03-07 03:49:45 UTC (rev 30)
+++ trunk/examples/svn_readme.txt 2011-03-07 11:36:40 UTC (rev 31)
@@ -21,4 +21,8 @@
To examine the property:
svn propget svn:externals make-simple/
-
+I have to note that externals significantly slow down svn;
+you may find the --ignore-externals switch useful.
+For example:
+svn update --ignore-externals
+
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 03:49:52
|
Revision: 30
http://simplectest.svn.sourceforge.net/simplectest/?rev=30&view=rev
Author: mlg7
Date: 2011-03-07 03:49:45 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
fixed the script for compatibility with python 2.5 as well
Modified Paths:
--------------
trunk/src/genmaintest.py
Modified: trunk/src/genmaintest.py
===================================================================
--- trunk/src/genmaintest.py 2011-03-07 02:18:07 UTC (rev 29)
+++ trunk/src/genmaintest.py 2011-03-07 03:49:45 UTC (rev 30)
@@ -121,7 +121,8 @@
f = open(outfile,'r')
src = f.read()
f.close()
- except IOError as e:
+ except IOError:
+ # as e: # syntax has changed from Python v2.5 to v3, now using neither the old nor the new
#print e
print "creating file with default content:",outfile
src = defaultSrc;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 02:18:13
|
Revision: 29
http://simplectest.svn.sourceforge.net/simplectest/?rev=29&view=rev
Author: mlg7
Date: 2011-03-07 02:18:07 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
added a scons example project
Added Paths:
-----------
trunk/examples/scons/
trunk/examples/scons/SConstruct
Property changes on: trunk/examples/scons
___________________________________________________________________
Added: svn:externals
+ ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests tests
../../aux-shared/hello-test/main.cpp main.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
Added: trunk/examples/scons/SConstruct
===================================================================
--- trunk/examples/scons/SConstruct (rev 0)
+++ trunk/examples/scons/SConstruct 2011-03-07 02:18:07 UTC (rev 29)
@@ -0,0 +1,34 @@
+#!/usr/bin/python
+
+from genmaintest import genMainTest
+
+sources = Split("""
+ add
+ sub
+ main
+""")
+sources_cpp = map((lambda x:x+".cpp"),sources)
+sources_cpp_but_main = map((lambda x:x+".cpp"),filter((lambda x:x!='main'),sources))
+
+test_main_cpp = 'tests/testmain.cpp'
+test_sources_cpp = map(str,Glob('tests/*.cpp'))
+if test_main_cpp in test_sources_cpp:
+ test_sources_cpp.remove(test_main_cpp)
+
+env = Environment()
+env.AppendUnique(CCFLAGS = Split('-Wall -Wextra -O3'))
+
+main = env.Program('main', sources_cpp)
+env.Default(main)
+
+#gtm = env.Command(test_main_cpp, test_sources_cpp, './genmaintest.py $TARGET $SOURCES')
+def do_generation(target, source, env):
+ if len(target) != 1:
+ raise Exception("must specify exactly one target")
+ genMainTest(str(target[0]),map(str, source))
+
+gtm = env.Command(test_main_cpp, test_sources_cpp, do_generation)
+test = env.Program('test', test_sources_cpp + sources_cpp_but_main + [gtm])
+env.NoClean(gtm)
+env.Precious(gtm)
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 02:04:01
|
Revision: 28
http://simplectest.svn.sourceforge.net/simplectest/?rev=28&view=rev
Author: mlg7
Date: 2011-03-07 02:03:55 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
modified the script to allow import from Scons
Modified Paths:
--------------
trunk/src/genmaintest.py
Modified: trunk/src/genmaintest.py
===================================================================
--- trunk/src/genmaintest.py 2011-03-07 01:47:38 UTC (rev 27)
+++ trunk/src/genmaintest.py 2011-03-07 02:03:55 UTC (rev 28)
@@ -2,11 +2,16 @@
# NOTE: this script will not work under linux if you recode it to use CR LF (dos-style) line endings.
# The main test source file generator for simplectest http://simplectest.sf.net/
+# Version: 1.1
# This software is Public Domain
# Copyleft (p) Michael L Gassanenko, 2011
# Distributed WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# History:
+# Version: 1.0 -- mlg -- initial
+# Version: 1.1 -- mlg -- moved the code into genMainTest() function that may be invoked from Scons
+
# Typical usage:
# I create a directory tests/ that will contain unit test cpp sources.
# (Alternatively, you may prefix all unit test filenames with some word, say, 'test' or whatever you like)
@@ -47,22 +52,14 @@
import re
from glob import glob
-if len(sys.argv)<3:
- print "typical usage: "
- print " ", sys.argv[0], "outfile filemask..."
- print "for example:"
- print " ", sys.argv[0], " tests/maintest.cpp 'tests/*.cpp'"
- raise Exception("not enough arguments")
-# these few lines explain what the input data are
-outfile = sys.argv[1]
-infilemasks = sys.argv[2:]
-startDeclarations = "/* declarations{ */";
-endDeclarations = "/* }declarations */";
-startInvocations = "/* invocations{ */";
-endInvocations = "/* }invocations */";
-defaultSrc = """/* Generated by genmaintest.py */
+def genMainTest(outfile, infilemasks):
+ startDeclarations = "/* declarations{ */";
+ endDeclarations = "/* }declarations */";
+ startInvocations = "/* invocations{ */";
+ endInvocations = "/* }invocations */";
+ defaultSrc = """/* Generated by genmaintest.py */
/* You MAY edit this file, but genmaintest.py will */
/* automatically update test suite declarations and invocations. */
/* The Simplectest site is http://simplectest.sf.net/ */
@@ -79,72 +76,91 @@
"""
-# ===========================================
+ # ===========================================
-# find out what source files to scan
-files = set();
+ # find out what source files to scan
+ files = set();
-for mask in infilemasks:
- for fname in glob(mask):
- files.add(fname)
+ for mask in infilemasks:
+ for fname in glob(mask):
+ files.add(fname)
-files.difference([outfile])
+ files.difference([outfile])
-#print(files)
+ #print(files)
-# find out test suite names
+ # find out test suite names
-suites = set()
-for fname in files:
- #print(fname)
- f = open(fname,'r')
- text = f.read()
- f.close()
- macroDefinitions = re.findall('#define START_SUITE', text)
- if [] != macroDefinitions:
- raise Exception("cannot parse files that define START_SUITE")
- matches = re.findall('START_SUITE\\([a-zA-Z0-9_ \t]*\\)', text)
- matches = map((lambda x:x[len("START_SUITE("):-len(")")]), matches)
- for suite in matches:
- suites.add(suite)
- #print matches
+ suites = set()
+ for fname in files:
+ #print(fname)
+ f = open(fname,'r')
+ text = f.read()
+ f.close()
+ macroDefinitions = re.findall('#define START_SUITE', text)
+ if [] != macroDefinitions:
+ raise Exception("cannot parse files that define START_SUITE")
+ matches = re.findall('START_SUITE\\([a-zA-Z0-9_ \t]*\\)', text)
+ matches = map((lambda x:x[len("START_SUITE("):-len(")")]), matches)
+ for suite in matches:
+ suites.add(suite)
+ #print matches
-#print suites
+ #print suites
-# knowing test suite names, prepare the declaration and invocation code
-declarations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"DEFINE_SUITE("+x+")\n"),suites),"")
-invocations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"\tSUITE("+x+");\n"),suites),"")
-#print declarations
-#print invocations
+ # knowing test suite names, prepare the declaration and invocation code
+ declarations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"DEFINE_SUITE("+x+")\n"),suites),"")
+ invocations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"\tSUITE("+x+");\n"),suites),"")
+ #print declarations
+ #print invocations
-# get the current version of the main testing module source (use the default if it does not exist)
-src = "";
-try:
- f = open(outfile,'r')
- src = f.read()
- f.close()
-except IOError:
- src = defaultSrc;
+ # get the current version of the main testing module source (use the default if it does not exist)
+ src = "";
+ try:
+ f = open(outfile,'r')
+ src = f.read()
+ f.close()
+ except IOError as e:
+ #print e
+ print "creating file with default content:",outfile
+ src = defaultSrc;
-#print src
+ #print src
-try:
- # replace the old declaration and invocation sections in the source
- # with the ones constructed above
- def before(str,substr): return str.index(substr);
- def after(str,substr): return str.index(substr) + len(substr);
+ try:
+ # replace the old declaration and invocation sections in the source
+ # with the ones constructed above
+ def before(str,substr): return str.index(substr);
+ def after(str,substr): return str.index(substr) + len(substr);
- src = src[:after(src,startDeclarations)] + declarations + src[before(src,endDeclarations):]
- src = src[:after(src,startInvocations)] + invocations + src[before(src,endInvocations):]
-except ValueError:
- # at least one begin/end section mark was not found
- print "\n*** BAD SOURCE ***\n"
- raise Exception("bad c/c++ source: no declaration and/or invocation block found")
-else:
- # replaced ok, now write the updated source into the file
- f = open(outfile, "w")
- f.write(src)
- f.close()
+ src = src[:after(src,startDeclarations)] + declarations + src[before(src,endDeclarations):]
+ src = src[:after(src,startInvocations)] + invocations + src[before(src,endInvocations):]
+ except ValueError:
+ # at least one begin/end section mark was not found
+ print "\n*** BAD SOURCE ***\n"
+ raise Exception("bad c/c++ source: no declaration and/or invocation block found")
+ else:
+ # replaced ok, now write the updated source into the file
+ f = open(outfile, "w")
+ f.write(src)
+ f.close()
-# print src
+
+# ============================================================================
+# the main function
+
+if __name__ == "__main__":
+ if len(sys.argv)<3:
+ print "typical usage: "
+ print " ", sys.argv[0], "outfile filemask..."
+ print "for example:"
+ print " ", sys.argv[0], " tests/maintest.cpp 'tests/*.cpp'"
+ raise Exception("not enough arguments")
+
+ # these few lines explain what the input data are
+ outfile = sys.argv[1]
+ infilemasks = sys.argv[2:]
+ genMainTest(outfile, infilemasks)
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 01:47:49
|
Revision: 27
http://simplectest.svn.sourceforge.net/simplectest/?rev=27&view=rev
Author: mlg7
Date: 2011-03-07 01:47:38 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
tidied up Makefile
Modified Paths:
--------------
trunk/examples/make-d/Makefile
Modified: trunk/examples/make-d/Makefile
===================================================================
--- trunk/examples/make-d/Makefile 2011-03-07 01:30:35 UTC (rev 26)
+++ trunk/examples/make-d/Makefile 2011-03-07 01:47:38 UTC (rev 27)
@@ -9,7 +9,8 @@
FULL_DEPS=$(SOURCES:%.cpp=%.d)
EXISTING_DEPS=$(wildcard *.d)
-CFLAGS += -MD -MP
+# generation of .d (dependency) files
+CXXFLAGS += -MD -MP
LDFLAGS=-gdwarf-2 -g3
@@ -17,7 +18,7 @@
#implicit rule:
#%.o %.d: %.cpp
-# $(CXX) -MD -MP $(CPPFLAGS) $(CFLAGS) -c -o $*.o $<
+# $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c
$(TARGET): $(OBJECTS)
$(CXX) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(LOADLIBES) $(LDLIBS)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 01:30:43
|
Revision: 26
http://simplectest.svn.sourceforge.net/simplectest/?rev=26&view=rev
Author: mlg7
Date: 2011-03-07 01:30:35 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
added make-d/ -- an example that uses make and .d files
Added Paths:
-----------
trunk/examples/make-d/
trunk/examples/make-d/Makefile
Property changes on: trunk/examples/make-d
___________________________________________________________________
Added: svn:externals
+ ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests tests
../../aux-shared/hello-test/main.cpp main.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
Added: trunk/examples/make-d/Makefile
===================================================================
--- trunk/examples/make-d/Makefile (rev 0)
+++ trunk/examples/make-d/Makefile 2011-03-07 01:30:35 UTC (rev 26)
@@ -0,0 +1,40 @@
+TARGET=$(shell basename `pwd`)-example-app
+SOURCES=$(wildcard *.cpp)
+MAINTEST=tests/maintest.cpp
+TESTS=$(wildcard tests/*.cpp)
+OBJECTS=$(SOURCES:%.cpp=%.o)
+TESTOBJECTS=$(TESTS:%.cpp=%.o)
+OBJECTSBUTMAIN=$(OBJECTS:main.o=)
+TESTSBUTMAIN=$(TESTS:$(MAINTEST)=)
+FULL_DEPS=$(SOURCES:%.cpp=%.d)
+EXISTING_DEPS=$(wildcard *.d)
+
+CFLAGS += -MD -MP
+
+LDFLAGS=-gdwarf-2 -g3
+
+all: $(TARGET)
+
+#implicit rule:
+#%.o %.d: %.cpp
+# $(CXX) -MD -MP $(CPPFLAGS) $(CFLAGS) -c -o $*.o $<
+
+$(TARGET): $(OBJECTS)
+ $(CXX) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(LOADLIBES) $(LDLIBS)
+
+$(MAINTEST): $(TESTSBUTMAIN)
+ python ./genmaintest.py $(MAINTEST) $(TESTS)
+
+test: $(OBJECTSBUTMAIN) $(TESTS) $(MAINTEST)
+ $(CXX) -o test $(TESTSBUTMAIN) $(MAINTEST) $(LDFLAGS) $(OBJECTSBUTMAIN) $(LOADLIBES) $(LDLIBS)
+
+deps: $(FULL_DEPS)
+
+clean:
+ $(RM) $(OBJECTS) $(TARGET) test $(TESTOBJECTS) $(EXISTING_DEPS)
+
+
+-include $(FULL_DEPS)
+
+.PHONY: all clean
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 01:23:23
|
Revision: 25
http://simplectest.svn.sourceforge.net/simplectest/?rev=25&view=rev
Author: mlg7
Date: 2011-03-07 01:23:17 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
renamed make-gen/ to make/
Added Paths:
-----------
trunk/examples/make/
Removed Paths:
-------------
trunk/examples/make-gen/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 00:42:21
|
Revision: 24
http://simplectest.svn.sourceforge.net/simplectest/?rev=24&view=rev
Author: mlg7
Date: 2011-03-07 00:42:11 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
changed directory properties; now it assembles an example project from:
1) simplectest sources (trunk/src/)
2) example application (trunk/aux-shared/hello-test/)
3) Makefile (in this directory)
Property Changed:
----------------
trunk/examples/make-gen/
Property changes on: trunk/examples/make-gen
___________________________________________________________________
Modified: svn:externals
- ../../aux-shared/hello-test src
../../src src
+ ../../aux-shared/hello-test/whatWasGenerated whatWasGenerated
../../aux-shared/hello-test/tests tests
../../aux-shared/hello-test/main.cpp main.cpp
../../aux-shared/hello-test/add.cpp add.cpp
../../aux-shared/hello-test/sub.cpp sub.cpp
../../aux-shared/hello-test/add.h add.h
../../aux-shared/hello-test/sub.h sub.h
../../aux-shared/hello-test/read.me read.me
../../src/license.txt license.txt
../../src/genmaintest.readme genmaintest.readme
../../src/genmaintest.py genmaintest.py
../../src/tests.h tests/tests.h
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 00:26:10
|
Revision: 23
http://simplectest.svn.sourceforge.net/simplectest/?rev=23&view=rev
Author: mlg7
Date: 2011-03-07 00:26:04 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
changed the main executable name
Modified Paths:
--------------
trunk/examples/make-gen/Makefile
Modified: trunk/examples/make-gen/Makefile
===================================================================
--- trunk/examples/make-gen/Makefile 2011-03-07 00:22:51 UTC (rev 22)
+++ trunk/examples/make-gen/Makefile 2011-03-07 00:26:04 UTC (rev 23)
@@ -1,4 +1,4 @@
-TARGET=$(shell basename `pwd`)
+TARGET=$(shell basename `pwd`)-example-app
SOURCES=$(wildcard *.cpp)
MAINTEST=tests/maintest.cpp
TESTS=$(wildcard tests/*.cpp)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 00:22:58
|
Revision: 22
http://simplectest.svn.sourceforge.net/simplectest/?rev=22&view=rev
Author: mlg7
Date: 2011-03-07 00:22:51 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
now explicitly calling python
Modified Paths:
--------------
trunk/examples/make-gen/Makefile
Modified: trunk/examples/make-gen/Makefile
===================================================================
--- trunk/examples/make-gen/Makefile 2011-03-07 00:18:50 UTC (rev 21)
+++ trunk/examples/make-gen/Makefile 2011-03-07 00:22:51 UTC (rev 22)
@@ -17,7 +17,7 @@
$(CXX) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(LOADLIBES) $(LDLIBS)
$(MAINTEST): $(TESTSBUTMAIN)
- ./genmaintest.py $(MAINTEST) $(TESTS)
+ python ./genmaintest.py $(MAINTEST) $(TESTS)
test: $(OBJECTSBUTMAIN) $(TESTS) $(MAINTEST)
$(CXX) -o test $(TESTSBUTMAIN) $(MAINTEST) $(LDFLAGS) $(OBJECTSBUTMAIN) $(LOADLIBES) $(LDLIBS)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-07 00:18:57
|
Revision: 21
http://simplectest.svn.sourceforge.net/simplectest/?rev=21&view=rev
Author: mlg7
Date: 2011-03-07 00:18:50 +0000 (Mon, 07 Mar 2011)
Log Message:
-----------
recoded to linux-style line endings, otherwise the script would not run under linux
Modified Paths:
--------------
trunk/src/genmaintest.py
Modified: trunk/src/genmaintest.py
===================================================================
--- trunk/src/genmaintest.py 2011-03-05 15:00:15 UTC (rev 20)
+++ trunk/src/genmaintest.py 2011-03-07 00:18:50 UTC (rev 21)
@@ -1,148 +1,150 @@
-#!/usr/bin/python
-# The main test source file generator for simplectest http://simplectest.sf.net/
-# This software is Public Domain
-# Copyleft (p) Michael L Gassanenko, 2011
-# Distributed WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-
-# Typical usage:
-# I create a directory tests/ that will contain unit test cpp sources.
-# (Alternatively, you may prefix all unit test filenames with some word, say, 'test' or whatever you like)
-# After I write unit tests, I run this script, e.g.
-# ./genmaintest.py tests/maintest.cpp 'tests/*.cpp'
-# and it generates the file maintest.cpp with the main function that invokes all test suites
-# in the cpp files in the tests directory.
-# (Note the quotes around *.cpp. They are there to prevent expansion of the file mask, but even
-# if the expansion happens, nothing bad will happen: the script can accept multiple file masks,
-# and will accept the files names as file masks, each file mask identifying exactly one file.
-# The script will always exclude the output file from the list of input files).
-#
-# To be honest, I added a target to my Makefile, you may do the same or run the script manually:
-# $(MAINTEST): $(TESTS)
-# ./genmaintest.py $(MAINTEST) $(TESTS)
-
-# This script is distributed as a part of the LGPL'ed Simple C++ Testing Framework:
-# ------------------------------
-# * Simple C++ Testing Framework
-# *
-# * This library is free software; you can redistribute it and/or
-# * modify it under the terms of the GNU Lesser General Public
-# * License as published by the Free Software Foundation; either
-# * version 2.1 of the License, or (at your option) any later version.
-# *
-# * This library is distributed in the hope that it will be useful,
-# * but WITHOUT ANY WARRANTY; without even the implied warranty of
-# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# * Lesser General Public License for more details.
-# *
-# * You should have received a copy of the GNU Lesser General Public
-# * License along with this library; if not, write to the Free Software
-# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-# *
-
-
-import sys
-import re
-from glob import glob
-
-if len(sys.argv)<3:
- print "typical usage: "
- print " ", sys.argv[0], "outfile filemask..."
- print "for example:"
- print " ", sys.argv[0], " tests/maintest.cpp 'tests/*.cpp'"
- raise Exception("not enough arguments")
-
-# these few lines explain what the input data are
-outfile = sys.argv[1]
-infilemasks = sys.argv[2:]
-
-startDeclarations = "/* declarations{ */";
-endDeclarations = "/* }declarations */";
-startInvocations = "/* invocations{ */";
-endInvocations = "/* }invocations */";
-defaultSrc = """/* Generated by genmaintest.py */
-/* You MAY edit this file, but genmaintest.py will */
-/* automatically update test suite declarations and invocations. */
-/* The Simplectest site is http://simplectest.sf.net/ */
-#include "tests.h"
-
-""" + startDeclarations + """
-
-""" + endDeclarations + """
-START_TESTS()
-""" + startInvocations + """
-
-""" + endInvocations + """
-END_TESTS()
-
-"""
-
-# ===========================================
-
-
-# find out what source files to scan
-files = set();
-
-for mask in infilemasks:
- for fname in glob(mask):
- files.add(fname)
-
-files.difference([outfile])
-
-#print(files)
-
-# find out test suite names
-
-suites = set()
-for fname in files:
- #print(fname)
- f = open(fname,'r')
- text = f.read()
- f.close()
- macroDefinitions = re.findall('#define START_SUITE', text)
- if [] != macroDefinitions:
- raise Exception("cannot parse files that define START_SUITE")
- matches = re.findall('START_SUITE\\([a-zA-Z0-9_ \t]*\\)', text)
- matches = map((lambda x:x[len("START_SUITE("):-len(")")]), matches)
- for suite in matches:
- suites.add(suite)
- #print matches
-
-#print suites
-
-# knowing test suite names, prepare the declaration and invocation code
-declarations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"DEFINE_SUITE("+x+")\n"),suites),"")
-invocations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"\tSUITE("+x+");\n"),suites),"")
-#print declarations
-#print invocations
-
-# get the current version of the main testing module source (use the default if it does not exist)
-src = "";
-try:
- f = open(outfile,'r')
- src = f.read()
- f.close()
-except IOError:
- src = defaultSrc;
-
-#print src
-
-try:
- # replace the old declaration and invocation sections in the source
- # with the ones constructed above
- def before(str,substr): return str.index(substr);
- def after(str,substr): return str.index(substr) + len(substr);
-
- src = src[:after(src,startDeclarations)] + declarations + src[before(src,endDeclarations):]
- src = src[:after(src,startInvocations)] + invocations + src[before(src,endInvocations):]
-except ValueError:
- # at least one begin/end section mark was not found
- print "\n*** BAD SOURCE ***\n"
- raise Exception("bad c/c++ source: no declaration and/or invocation block found")
-else:
- # replaced ok, now write the updated source into the file
- f = open(outfile, "w")
- f.write(src)
- f.close()
-
-# print src
+#!/usr/bin/python
+# NOTE: this script will not work under linux if you recode it to use CR LF (dos-style) line endings.
+
+# The main test source file generator for simplectest http://simplectest.sf.net/
+# This software is Public Domain
+# Copyleft (p) Michael L Gassanenko, 2011
+# Distributed WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# Typical usage:
+# I create a directory tests/ that will contain unit test cpp sources.
+# (Alternatively, you may prefix all unit test filenames with some word, say, 'test' or whatever you like)
+# After I write unit tests, I run this script, e.g.
+# ./genmaintest.py tests/maintest.cpp 'tests/*.cpp'
+# and it generates the file maintest.cpp with the main function that invokes all test suites
+# in the cpp files in the tests directory.
+# (Note the quotes around *.cpp. They are there to prevent expansion of the file mask, but even
+# if the expansion happens, nothing bad will happen: the script can accept multiple file masks,
+# and will accept the files names as file masks, each file mask identifying exactly one file.
+# The script will always exclude the output file from the list of input files).
+#
+# To be honest, I added a target to my Makefile, you may do the same or run the script manually:
+# $(MAINTEST): $(TESTS)
+# ./genmaintest.py $(MAINTEST) $(TESTS)
+
+# This script is distributed as a part of the LGPL'ed Simple C++ Testing Framework:
+# ------------------------------
+# * Simple C++ Testing Framework
+# *
+# * This library is free software; you can redistribute it and/or
+# * modify it under the terms of the GNU Lesser General Public
+# * License as published by the Free Software Foundation; either
+# * version 2.1 of the License, or (at your option) any later version.
+# *
+# * This library is distributed in the hope that it will be useful,
+# * but WITHOUT ANY WARRANTY; without even the implied warranty of
+# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# * Lesser General Public License for more details.
+# *
+# * You should have received a copy of the GNU Lesser General Public
+# * License along with this library; if not, write to the Free Software
+# * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# *
+
+
+import sys
+import re
+from glob import glob
+
+if len(sys.argv)<3:
+ print "typical usage: "
+ print " ", sys.argv[0], "outfile filemask..."
+ print "for example:"
+ print " ", sys.argv[0], " tests/maintest.cpp 'tests/*.cpp'"
+ raise Exception("not enough arguments")
+
+# these few lines explain what the input data are
+outfile = sys.argv[1]
+infilemasks = sys.argv[2:]
+
+startDeclarations = "/* declarations{ */";
+endDeclarations = "/* }declarations */";
+startInvocations = "/* invocations{ */";
+endInvocations = "/* }invocations */";
+defaultSrc = """/* Generated by genmaintest.py */
+/* You MAY edit this file, but genmaintest.py will */
+/* automatically update test suite declarations and invocations. */
+/* The Simplectest site is http://simplectest.sf.net/ */
+#include "tests.h"
+
+""" + startDeclarations + """
+
+""" + endDeclarations + """
+START_TESTS()
+""" + startInvocations + """
+
+""" + endInvocations + """
+END_TESTS()
+
+"""
+
+# ===========================================
+
+
+# find out what source files to scan
+files = set();
+
+for mask in infilemasks:
+ for fname in glob(mask):
+ files.add(fname)
+
+files.difference([outfile])
+
+#print(files)
+
+# find out test suite names
+
+suites = set()
+for fname in files:
+ #print(fname)
+ f = open(fname,'r')
+ text = f.read()
+ f.close()
+ macroDefinitions = re.findall('#define START_SUITE', text)
+ if [] != macroDefinitions:
+ raise Exception("cannot parse files that define START_SUITE")
+ matches = re.findall('START_SUITE\\([a-zA-Z0-9_ \t]*\\)', text)
+ matches = map((lambda x:x[len("START_SUITE("):-len(")")]), matches)
+ for suite in matches:
+ suites.add(suite)
+ #print matches
+
+#print suites
+
+# knowing test suite names, prepare the declaration and invocation code
+declarations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"DEFINE_SUITE("+x+")\n"),suites),"")
+invocations = '\n' + reduce((lambda x,y:x+y),map((lambda x:"\tSUITE("+x+");\n"),suites),"")
+#print declarations
+#print invocations
+
+# get the current version of the main testing module source (use the default if it does not exist)
+src = "";
+try:
+ f = open(outfile,'r')
+ src = f.read()
+ f.close()
+except IOError:
+ src = defaultSrc;
+
+#print src
+
+try:
+ # replace the old declaration and invocation sections in the source
+ # with the ones constructed above
+ def before(str,substr): return str.index(substr);
+ def after(str,substr): return str.index(substr) + len(substr);
+
+ src = src[:after(src,startDeclarations)] + declarations + src[before(src,endDeclarations):]
+ src = src[:after(src,startInvocations)] + invocations + src[before(src,endInvocations):]
+except ValueError:
+ # at least one begin/end section mark was not found
+ print "\n*** BAD SOURCE ***\n"
+ raise Exception("bad c/c++ source: no declaration and/or invocation block found")
+else:
+ # replaced ok, now write the updated source into the file
+ f = open(outfile, "w")
+ f.write(src)
+ f.close()
+
+# print src
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 15:00:21
|
Revision: 20
http://simplectest.svn.sourceforge.net/simplectest/?rev=20&view=rev
Author: mlg7
Date: 2011-03-05 15:00:15 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
directing 2 externals into the same directory
Property Changed:
----------------
trunk/examples/make-gen/
Property changes on: trunk/examples/make-gen
___________________________________________________________________
Modified: svn:externals
- ../../aux-shared/hello-test src
+ ../../aux-shared/hello-test src
../../src src
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 14:55:44
|
Revision: 19
http://simplectest.svn.sourceforge.net/simplectest/?rev=19&view=rev
Author: mlg7
Date: 2011-03-05 14:55:36 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
modified an external
Property Changed:
----------------
trunk/examples/make-gen/
Property changes on: trunk/examples/make-gen
___________________________________________________________________
Modified: svn:externals
- ../aux-shared/hello-test src
+ ../../aux-shared/hello-test src
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 14:42:04
|
Revision: 18
http://simplectest.svn.sourceforge.net/simplectest/?rev=18&view=rev
Author: mlg7
Date: 2011-03-05 14:41:58 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
once more testing properties
Property Changed:
----------------
trunk/examples/make-gen/
Property changes on: trunk/examples/make-gen
___________________________________________________________________
Modified: svn:externals
-
+ ../aux-shared/hello-test src
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 14:22:37
|
Revision: 17
http://simplectest.svn.sourceforge.net/simplectest/?rev=17&view=rev
Author: mlg7
Date: 2011-03-05 14:22:28 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
removing read.me: symlinks are broken
Removed Paths:
-------------
trunk/examples/make-gen/read.me
Deleted: trunk/examples/make-gen/read.me
===================================================================
--- trunk/examples/make-gen/read.me 2011-03-05 14:17:56 UTC (rev 16)
+++ trunk/examples/make-gen/read.me 2011-03-05 14:22:28 UTC (rev 17)
@@ -1,2 +0,0 @@
-
-link ../../aux-shared/hello-test/read.me
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 14:18:04
|
Revision: 16
http://simplectest.svn.sourceforge.net/simplectest/?rev=16&view=rev
Author: mlg7
Date: 2011-03-05 14:17:56 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
testing symlink change from windows
Modified Paths:
--------------
trunk/examples/make-gen/read.me
Modified: trunk/examples/make-gen/read.me
===================================================================
--- trunk/examples/make-gen/read.me 2011-03-05 14:13:48 UTC (rev 15)
+++ trunk/examples/make-gen/read.me 2011-03-05 14:17:56 UTC (rev 16)
@@ -1 +1,2 @@
+
link ../../aux-shared/hello-test/read.me
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 14:13:56
|
Revision: 15
http://simplectest.svn.sourceforge.net/simplectest/?rev=15&view=rev
Author: mlg7
Date: 2011-03-05 14:13:48 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
added read.me -- mostly to test symlinks under windows
Added Paths:
-----------
trunk/examples/make-gen/read.me
Added: trunk/examples/make-gen/read.me
===================================================================
--- trunk/examples/make-gen/read.me (rev 0)
+++ trunk/examples/make-gen/read.me 2011-03-05 14:13:48 UTC (rev 15)
@@ -0,0 +1 @@
+link ../../aux-shared/hello-test/read.me
\ No newline at end of file
Property changes on: trunk/examples/make-gen/read.me
___________________________________________________________________
Added: svn:special
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 14:05:07
|
Revision: 14
http://simplectest.svn.sourceforge.net/simplectest/?rev=14&view=rev
Author: mlg7
Date: 2011-03-05 14:05:01 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
removed the properties that did not work
Property Changed:
----------------
trunk/examples/
Property changes on: trunk/examples
___________________________________________________________________
Modified: svn:externals
- ../aux-shared/hello-test make-gen
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ml...@us...> - 2011-03-05 13:32:40
|
Revision: 13
http://simplectest.svn.sourceforge.net/simplectest/?rev=13&view=rev
Author: mlg7
Date: 2011-03-05 13:32:34 +0000 (Sat, 05 Mar 2011)
Log Message:
-----------
added examples/make-gen/ -- makefile example using the genmaintest.py script
Added Paths:
-----------
trunk/examples/make-gen/
trunk/examples/make-gen/Makefile
Property Changed:
----------------
trunk/examples/
Property changes on: trunk/examples
___________________________________________________________________
Added: svn:externals
+ ../aux-shared/hello-test make-gen
Property changes on: trunk/examples/make-gen
___________________________________________________________________
Added: svn:externals
+
Added: trunk/examples/make-gen/Makefile
===================================================================
--- trunk/examples/make-gen/Makefile (rev 0)
+++ trunk/examples/make-gen/Makefile 2011-03-05 13:32:34 UTC (rev 13)
@@ -0,0 +1,32 @@
+TARGET=$(shell basename `pwd`)
+SOURCES=$(wildcard *.cpp)
+MAINTEST=tests/maintest.cpp
+TESTS=$(wildcard tests/*.cpp)
+OBJECTS=$(SOURCES:%.cpp=%.o)
+TESTOBJECTS=$(TESTS:%.cpp=%.o)
+OBJECTSBUTMAIN=$(OBJECTS:main.o=)
+TESTSBUTMAIN=$(TESTS:$(MAINTEST)=)
+
+LDFLAGS=-gdwarf-2 -g3
+
+all: $(TARGET)
+
+$(OBJECTS): $(SOURCES)
+
+$(TARGET): $(OBJECTS)
+ $(CXX) -o $(TARGET) $(LDFLAGS) $(OBJECTS) $(LOADLIBES) $(LDLIBS)
+
+$(MAINTEST): $(TESTSBUTMAIN)
+ ./genmaintest.py $(MAINTEST) $(TESTS)
+
+test: $(OBJECTSBUTMAIN) $(TESTS) $(MAINTEST)
+ $(CXX) -o test $(TESTSBUTMAIN) $(MAINTEST) $(LDFLAGS) $(OBJECTSBUTMAIN) $(LOADLIBES) $(LDLIBS)
+
+clean:
+ $(RM) $(OBJECTS) $(TARGET) test $(TESTOBJECTS)
+
+
+
+
+.PHONY: all clean
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|