diff options
Diffstat (limited to 'test/Repository')
-rw-r--r-- | test/Repository/CPPPATH.py | 2 | ||||
-rw-r--r-- | test/Repository/LIBPATH.py | 4 | ||||
-rw-r--r-- | test/Repository/M4.py | 7 | ||||
-rw-r--r-- | test/Repository/Program.py | 21 | ||||
-rw-r--r-- | test/Repository/StaticLibrary.py | 12 | ||||
-rw-r--r-- | test/Repository/absolute-path.py | 6 | ||||
-rw-r--r-- | test/Repository/include.py | 4 | ||||
-rw-r--r-- | test/Repository/link-object.py | 8 | ||||
-rw-r--r-- | test/Repository/multi-dir.py | 2 | ||||
-rw-r--r-- | test/Repository/no-SConsignFile.py | 1 | ||||
-rw-r--r-- | test/Repository/no-repository.py | 6 | ||||
-rw-r--r-- | test/Repository/signature-order.py | 2 | ||||
-rw-r--r-- | test/Repository/top-level-path.py | 6 | ||||
-rw-r--r-- | test/Repository/variants.py | 8 | ||||
-rw-r--r-- | test/Repository/within-repository.py | 12 |
15 files changed, 98 insertions, 3 deletions
diff --git a/test/Repository/CPPPATH.py b/test/Repository/CPPPATH.py index 6ec21f3..9db613e 100644 --- a/test/Repository/CPPPATH.py +++ b/test/Repository/CPPPATH.py @@ -53,6 +53,8 @@ test.write(['repository', 'include2', 'foo.h'], r""" """) test.write(['repository', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <foo.h> int main(int argc, char *argv[]) diff --git a/test/Repository/LIBPATH.py b/test/Repository/LIBPATH.py index c4470d2..9216a8b 100644 --- a/test/Repository/LIBPATH.py +++ b/test/Repository/LIBPATH.py @@ -62,6 +62,8 @@ env_yyy.Command('yyy.out', bbb_exe, write_LIBDIRFLAGS) """) test.write(['work', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> int main(int argc, char *argv[]) { @@ -72,6 +74,8 @@ main(int argc, char *argv[]) """) test.write(['work', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> int main(int argc, char *argv[]) { diff --git a/test/Repository/M4.py b/test/Repository/M4.py index 75fa0de..15d8abb 100644 --- a/test/Repository/M4.py +++ b/test/Repository/M4.py @@ -34,7 +34,7 @@ import string import sys import TestSCons -python = TestSCons.python +_python_ = TestSCons._python_ test = TestSCons.TestSCons() @@ -48,16 +48,17 @@ sys.stdout.write(string.replace(contents, 'M4', 'mym4.py')) sys.exit(0) """) +mym4_py = test.workpath('mym4.py') opts = "-Y " + test.workpath('repository') test.write(['repository', 'SConstruct'], """\ -env = Environment(M4 = r'%s %s', tools=['default', 'm4']) +env = Environment(M4 = r'%(_python_)s %(mym4_py)s', tools=['default', 'm4']) env.M4(target = 'aaa.x', source = 'aaa.x.m4') SConscript('src/SConscript', "env", build_dir="build") -""" % (python, test.workpath('mym4.py'))) +""" % locals()) test.write(['repository', 'aaa.x.m4'], """\ line 1 diff --git a/test/Repository/Program.py b/test/Repository/Program.py index 93bcb85..eda1202 100644 --- a/test/Repository/Program.py +++ b/test/Repository/Program.py @@ -51,6 +51,7 @@ env.Program(target= 'foo', source = Split('aaa.c bbb.c foo.c')) """ % repository) test.write(['repository', 'aaa.c'], r""" +#include <stdio.h> void aaa(void) { @@ -59,6 +60,7 @@ aaa(void) """) test.write(['repository', 'bbb.c'], r""" +#include <stdio.h> void bbb(void) { @@ -67,6 +69,9 @@ bbb(void) """) test.write(['repository', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> + extern void aaa(void); extern void bbb(void); int @@ -95,6 +100,7 @@ test.up_to_date(chdir = 'work1', arguments = '.') # test.write(['work1', 'bbb.c'], r""" +#include <stdio.h> void bbb(void) { @@ -113,6 +119,7 @@ test.up_to_date(chdir = 'work1', arguments = '.') # test.write(['work1', 'aaa.c'], r""" +#include <stdio.h> void aaa(void) { @@ -121,6 +128,8 @@ aaa(void) """) test.write(['work1', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int @@ -185,6 +194,7 @@ env.Program(target= 'foo', source = Split('aaa.c bbb.c foo.c')) """ % (repository_new, repository_old)) test.write(['repository.old', 'aaa.c'], r""" +#include <stdio.h> void aaa(void) { @@ -193,6 +203,7 @@ aaa(void) """) test.write(['repository.old', 'bbb.c'], r""" +#include <stdio.h> void bbb(void) { @@ -201,6 +212,8 @@ bbb(void) """) test.write(['repository.old', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int @@ -232,6 +245,8 @@ test.up_to_date(chdir = 'work2', arguments = '.') test.writable('repository.new', 1) test.write(['repository.new', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void aaa(void) { @@ -240,6 +255,8 @@ aaa(void) """) test.write(['work2', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -261,6 +278,8 @@ test.up_to_date(chdir = 'work2', arguments = '.') # test.write(['work2', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void aaa(void) { @@ -269,6 +288,8 @@ aaa(void) """) test.write(['work2', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int diff --git a/test/Repository/StaticLibrary.py b/test/Repository/StaticLibrary.py index 087fa7e..1cf20c3 100644 --- a/test/Repository/StaticLibrary.py +++ b/test/Repository/StaticLibrary.py @@ -66,6 +66,8 @@ env.Program(target = 'foo', source = 'foo.c') """) test.write(['repository', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void aaa(void) { @@ -74,6 +76,8 @@ aaa(void) """) test.write(['repository', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -82,6 +86,8 @@ bbb(void) """) test.write(['repository', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int @@ -118,6 +124,8 @@ test.fail_test(os.path.exists(repository_foo)) test.up_to_date(chdir = 'work1', options = opts, arguments = ".") test.write(['work1', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -168,6 +176,8 @@ test.writable('repository', 0) test.up_to_date(chdir = 'work2', options = opts, arguments = ".") test.write(['work2', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -194,6 +204,8 @@ test.up_to_date(chdir = 'work2', options = opts, arguments = ".") test.up_to_date(chdir = 'work3', options = opts, arguments = ".") test.write(['work3', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int diff --git a/test/Repository/absolute-path.py b/test/Repository/absolute-path.py index ed360c7..378e321 100644 --- a/test/Repository/absolute-path.py +++ b/test/Repository/absolute-path.py @@ -57,6 +57,8 @@ env.Program('foo', ['aaa.c', r'%s', 'foo.c']) """ % subdir_aaa_c) test.write(['repository', 'src', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void src_aaa(void) { @@ -65,6 +67,8 @@ src_aaa(void) """) test.write(['subdir', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void subdir_aaa(void) { @@ -73,6 +77,8 @@ subdir_aaa(void) """) test.write(['repository', 'src', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void src_aaa(void); extern void subdir_aaa(void); int diff --git a/test/Repository/include.py b/test/Repository/include.py index 577442a..4575d99 100644 --- a/test/Repository/include.py +++ b/test/Repository/include.py @@ -56,6 +56,8 @@ test.write(['repository', 'bar.h'], r""" """) test.write(['repository', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <foo.h> int main(int argc, char *argv[]) @@ -100,6 +102,8 @@ test.up_to_date(chdir = 'work', arguments = '.') # test.write(['work', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <foo.h> int main(int argc, char *argv[]) diff --git a/test/Repository/link-object.py b/test/Repository/link-object.py index 63c274e..679fa7e 100644 --- a/test/Repository/link-object.py +++ b/test/Repository/link-object.py @@ -52,6 +52,8 @@ env.Program(target = 'foo', source = ['aaa.c', 'bbb.c', 'foo.c']) """ % workpath_repository) test.write(['repository', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void aaa(void) { @@ -60,6 +62,8 @@ aaa(void) """) test.write(['repository', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -68,6 +72,8 @@ bbb(void) """) test.write(['repository', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int @@ -107,6 +113,8 @@ test.up_to_date(chdir = 'work', arguments = ".") # test.write(['work', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { diff --git a/test/Repository/multi-dir.py b/test/Repository/multi-dir.py index 4532cc3..ab67c9d 100644 --- a/test/Repository/multi-dir.py +++ b/test/Repository/multi-dir.py @@ -73,6 +73,8 @@ test.write(['repository', 'src', 'include.h'], r""" """) test.write(['repository', 'src', 'main.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <include.h> int main(int argc, char *argv[]) diff --git a/test/Repository/no-SConsignFile.py b/test/Repository/no-SConsignFile.py index d838605..95b1749 100644 --- a/test/Repository/no-SConsignFile.py +++ b/test/Repository/no-SConsignFile.py @@ -45,6 +45,7 @@ env.Program('foo', 'src/foo.c') test.write(['src', 'foo.c'], """\ #include <stdio.h> +#include <stdlib.h> #include "foo.h" int main(int argc, char *argv[]) diff --git a/test/Repository/no-repository.py b/test/Repository/no-repository.py index 6dc9add..f9b245e 100644 --- a/test/Repository/no-repository.py +++ b/test/Repository/no-repository.py @@ -50,6 +50,8 @@ env.Program(target = 'foo', source = Split('aaa.c bbb.c foo.c')) """ % no_repository) test.write(['work', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void aaa(void) { @@ -58,6 +60,8 @@ aaa(void) """) test.write(['work', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -66,6 +70,8 @@ bbb(void) """) test.write(['work', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int diff --git a/test/Repository/signature-order.py b/test/Repository/signature-order.py index 8069b60..99bc56a 100644 --- a/test/Repository/signature-order.py +++ b/test/Repository/signature-order.py @@ -62,6 +62,8 @@ test.write(['repository', 'foo.h'], foo_h_contents) test.write(['repository', 'bar.h'], bar_h_contents) test.write(['repository', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <foo.h> #include <bar.h> int diff --git a/test/Repository/top-level-path.py b/test/Repository/top-level-path.py index 2d4164a..4dccfd5 100644 --- a/test/Repository/top-level-path.py +++ b/test/Repository/top-level-path.py @@ -56,6 +56,8 @@ env.Program('foo', ['aaa.c', '#subdir/aaa.c', 'foo.c']) """) test.write(['repository', 'src', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void src_aaa(void) { @@ -64,6 +66,8 @@ src_aaa(void) """) test.write(['repository', 'subdir', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void subdir_aaa(void) { @@ -72,6 +76,8 @@ subdir_aaa(void) """) test.write(['repository', 'src', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void src_aaa(void); extern void subdir_aaa(void); int diff --git a/test/Repository/variants.py b/test/Repository/variants.py index f855636..cd4c24a 100644 --- a/test/Repository/variants.py +++ b/test/Repository/variants.py @@ -133,6 +133,8 @@ test.write(['repository', 'src1', 'iii.h'], r""" """) test.write(['repository', 'src1', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <iii.h> void aaa(void) @@ -142,6 +144,8 @@ aaa(void) """) test.write(['repository', 'src1', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <iii.h> void bbb(void) @@ -151,6 +155,8 @@ bbb(void) """) test.write(['repository', 'src1', 'main.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <iii.h> extern void aaa(void); extern void bbb(void); @@ -189,6 +195,8 @@ test.write(['repository', 'src2', 'xxx', 'include.h'], r""" """) test.write(['repository', 'src2', 'xxx', 'main.c'], r""" +#include <stdio.h> +#include <stdlib.h> #include <include.h> #ifdef FOO #define MAIN_OS "FOO" diff --git a/test/Repository/within-repository.py b/test/Repository/within-repository.py index 1cffe81..0b7e844 100644 --- a/test/Repository/within-repository.py +++ b/test/Repository/within-repository.py @@ -53,6 +53,8 @@ env.Program(target = 'foo', source = ['aaa.c', 'bbb.c', 'foo.c']) """ % workpath_repository) test.write(['repository', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void aaa(void) { @@ -61,6 +63,8 @@ aaa(void) """) test.write(['repository', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -69,6 +73,8 @@ bbb(void) """) test.write(['repository', 'foo.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int @@ -88,6 +94,8 @@ env.Program(target = 'bar', source = ['aaa.c', 'bbb.c', 'bar.c']) """) test.write(['repository', 'src', 'aaa.c'], r""" +#include <stdio.h> +#include <stdlib.h> void aaa(void) { @@ -96,6 +104,8 @@ aaa(void) """) test.write(['repository', 'src', 'bbb.c'], r""" +#include <stdio.h> +#include <stdlib.h> void bbb(void) { @@ -104,6 +114,8 @@ bbb(void) """) test.write(['repository', 'src', 'bar.c'], r""" +#include <stdio.h> +#include <stdlib.h> extern void aaa(void); extern void bbb(void); int |