From 370689946ff4e5e9656b71190f69b502e75c2d8d Mon Sep 17 00:00:00 2001 From: Daniel Moody Date: Thu, 26 May 2022 12:20:47 -0500 Subject: make sure config=force doesn't cause rebuild --- test/Configure/conftest_source_file.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/test/Configure/conftest_source_file.py b/test/Configure/conftest_source_file.py index 2e3598c..879c436 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() -- cgit v0.12