diff options
author | Daniel Moody <dmoody256@gmail.com> | 2022-05-26 12:20:47 -0500 |
---|---|---|
committer | Daniel Moody <dmoody256@gmail.com> | 2022-05-26 12:20:47 -0500 |
commit | 370689946ff4e5e9656b71190f69b502e75c2d8d (patch) | |
tree | 06bd6f4b6a2d3e4f79db5d48443bdef5dba8b206 /test/Configure | |
parent | 78e5ce0c8fa9a7fcc1376fd554565bd80f089815 (diff) | |
download | scons-git-370689946ff4e5e9656b71190f69b502e75c2d8d.tar.gz |
make sure config=force doesn't cause rebuild
Diffstat (limited to 'test/Configure')
-rw-r--r-- | test/Configure/conftest_source_file.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/test/Configure/conftest_source_file.py b/test/Configure/conftest_source_file.py index 2e3598cd4..879c43656 100644 --- a/test/Configure/conftest_source_file.py +++ b/test/Configure/conftest_source_file.py @@ -29,6 +29,7 @@ Replace this with a description of the test. """ import textwrap +import os import TestSCons @@ -39,22 +40,25 @@ test.dir_fixture("conftest_source_file") test.run(arguments='.') conf_text = textwrap.dedent("""\ - Checking for C header file header1.h... {}yes - Checking for C header file header3.h... (cached) yes + Checking for C header file header1.h... {arg1}yes + Checking for C header file header3.h... {arg2}yes """) -test.up_to_date(read_str=conf_text.format('(cached) ')) +test.up_to_date(read_str=conf_text.format(arg1='(cached) ', arg2='(cached) ')) test.write('header2.h', """ #pragma once int test_header = 2; """) -test.not_up_to_date(read_str=conf_text.format('(cached) ')) +test.not_up_to_date(read_str=conf_text.format(arg1='(cached) ', arg2='(cached) ')) -test.up_to_date(read_str=conf_text.format('')) +test.up_to_date(read_str=conf_text.format(arg1='', arg2='(cached) ')) +os.environ['SCONSFLAGS'] = '--config=force' +test.up_to_date(read_str=conf_text.format(arg1='', arg2='')) +os.environ['SCONSFLAGS'] = '' -test.up_to_date(read_str=conf_text.format('(cached) ')) +test.up_to_date(read_str=conf_text.format(arg1='(cached) ', arg2='(cached) ')) test.pass_test() |