diff options
Diffstat (limited to 'test/Configure')
-rw-r--r-- | test/Configure/VariantDir-SConscript.py (renamed from test/Configure/BuildDir-SConscript.py) | 4 | ||||
-rw-r--r-- | test/Configure/VariantDir.py (renamed from test/Configure/BuildDir.py) | 4 | ||||
-rw-r--r-- | test/Configure/cache-not-ok.py | 12 | ||||
-rw-r--r-- | test/Configure/cache-ok.py | 8 | ||||
-rw-r--r-- | test/Configure/config-h.py | 26 |
5 files changed, 42 insertions, 12 deletions
diff --git a/test/Configure/BuildDir-SConscript.py b/test/Configure/VariantDir-SConscript.py index 47b7d82..a9371f9 100644 --- a/test/Configure/BuildDir-SConscript.py +++ b/test/Configure/VariantDir-SConscript.py @@ -26,7 +26,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ Verify that Configure calls in SConscript files work when used -with BuildDir. +with VariantDir. """ import os.path @@ -52,7 +52,7 @@ if env['chdir'] == 'yes': SConscriptChdir(1) else: SConscriptChdir(0) -BuildDir( 'build', '.' ) +VariantDir( 'build', '.' ) SConscript( 'build/SConscript' ) """) diff --git a/test/Configure/BuildDir.py b/test/Configure/VariantDir.py index ca3c147..63fcb93 100644 --- a/test/Configure/BuildDir.py +++ b/test/Configure/VariantDir.py @@ -25,7 +25,7 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__" """ -Verify that Configure contexts work with basic use of BuildDir. +Verify that Configure contexts work with basic use of VariantDir. """ import os.path @@ -45,7 +45,7 @@ test.write('SConstruct', """\ env = Environment(LOGFILE='build/config.log') import os env.AppendENVPath('PATH', os.environ['PATH']) -BuildDir( 'build', '.' ) +VariantDir( 'build', '.' ) conf = env.Configure(conf_dir='build/config.tests', log_file='$LOGFILE') r1 = conf.CheckCHeader( 'math.h' ) r2 = conf.CheckCHeader( 'no_std_c_header.h' ) # leads to compile error diff --git a/test/Configure/cache-not-ok.py b/test/Configure/cache-not-ok.py index 82e32f6..339c464 100644 --- a/test/Configure/cache-not-ok.py +++ b/test/Configure/cache-not-ok.py @@ -45,8 +45,8 @@ NCF = test.NCF # non-cached build failure CF = test.CF # cached build failure test.write('SConstruct', """\ -if int(ARGUMENTS.get('target_signatures_content', 0)): - TargetSignatures('content') +if not int(ARGUMENTS.get('target_signatures_content', 0)): + Decider('timestamp-newer') env = Environment() import os env.AppendENVPath('PATH', os.environ['PATH']) @@ -59,6 +59,8 @@ if not (not r1 and not r2): Exit(1) """) +# Verify correct behavior when we call Decider('timestamp-newer'). + test.run() test.checkLogAndStdout(["Checking for C header file no_std_c_header.h... ", "Checking for C library no_c_library_SAFFDG... "], @@ -71,11 +73,11 @@ test.run() test.checkLogAndStdout(["Checking for C header file no_std_c_header.h... ", "Checking for C library no_c_library_SAFFDG... "], ["no"]*2, - [[((".c", CR), (_obj, CF))], - [((".c", CR), (_obj, CR), (_exe, CF))]], + [[((".c", CR), (_obj, NCF))], + [((".c", CR), (_obj, CR), (_exe, NCF))]], "config.log", ".sconf_temp", "SConstruct") -# same should be true for TargetSignatures('content') +# Same should be true for the default behavior of Decider('content'). test.run(arguments='--config=force target_signatures_content=1') test.checkLogAndStdout(["Checking for C header file no_std_c_header.h... ", diff --git a/test/Configure/cache-ok.py b/test/Configure/cache-ok.py index d8eac77..7c98d0c 100644 --- a/test/Configure/cache-ok.py +++ b/test/Configure/cache-ok.py @@ -43,8 +43,8 @@ NCF = test.NCF # non-cached build failure CF = test.CF # cached build failure test.write('SConstruct', """\ -if int(ARGUMENTS.get('target_signatures_content', 0)): - TargetSignatures('content') +if not int(ARGUMENTS.get('target_signatures_content', 0)): + Decider('timestamp-newer') env = Environment() import os env.AppendENVPath('PATH', os.environ['PATH']) @@ -60,6 +60,8 @@ if not (r1 and r2 and r3 and r4 and r5 and r6): Exit(1) """ % locals()) +# Verify correct behavior when we call Decider('timestamp-newer') + test.run() test.checkLogAndStdout(["Checking for C library %s... " % lib, "Checking for C library None... ", @@ -87,7 +89,7 @@ test.checkLogAndStdout(["Checking for C library %s... " % lib, [[((".cpp", CR), (_obj, CR))]], "config.log", ".sconf_temp", "SConstruct") -# same should be true for TargetSignatures('content') +# same should be true for the default behavior of Decider('content') test.run(arguments='target_signatures_content=1 --config=force') test.checkLogAndStdout(["Checking for C library %s... " % lib, diff --git a/test/Configure/config-h.py b/test/Configure/config-h.py index 7bc8645..95121a9 100644 --- a/test/Configure/config-h.py +++ b/test/Configure/config-h.py @@ -89,18 +89,44 @@ expected_config_h = string.replace("""\ #ifndef CONFIG_H_SEEN #define CONFIG_H_SEEN + +/* Define to 1 if the system has the function `printf'. */ #define HAVE_PRINTF 1 + +/* Define to 1 if the system has the function `noFunctionCall'. */ /* #undef HAVE_NOFUNCTIONCALL */ + +/* Define to 1 if the system has the type `int'. */ #define HAVE_INT 1 + +/* Define to 1 if the system has the type `noType'. */ /* #undef HAVE_NOTYPE */ + +/* Define to 1 if you have the <stdio.h> header file. */ #define HAVE_STDIO_H 1 + +/* Define to 1 if you have the <hopefullynoc-header.h> header file. */ /* #undef HAVE_HOPEFULLYNOC_HEADER_H */ + +/* Define to 1 if you have the <vector> header file. */ #define HAVE_VECTOR 1 + +/* Define to 1 if you have the <hopefullynocxx-header.h> header file. */ /* #undef HAVE_HOPEFULLYNOCXX_HEADER_H */ + +/* Define to 1 if you have the `%(lib)s' library. */ #define HAVE_%(LIB)s 1 + +/* Define to 1 if you have the `hopefullynolib' library. */ /* #undef HAVE_LIBHOPEFULLYNOLIB */ + +/* Define to 1 if you have the `%(lib)s' library. */ #define HAVE_%(LIB)s 1 + +/* Define to 1 if you have the `%(lib)s' library. */ /* #undef HAVE_%(LIB)s */ + +/* Define to 1 if you have the `hopefullynolib2' library. */ /* #undef HAVE_LIBHOPEFULLYNOLIB2 */ #endif /* CONFIG_H_SEEN */ |