summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2024-11-08 20:29:07 (GMT)
committerMats Wichmann <mats@linux.com>2024-12-15 20:43:42 (GMT)
commit70e8cf9245f069d4eba070b6c8aa8fbe218e19ec (patch)
treec39fe8328f85ce0f9bf52e38e5c075cb03f03a38 /test
parent9d5e76a42341596583924470feebcc637fcb8ac8 (diff)
downloadSCons-70e8cf9245f069d4eba070b6c8aa8fbe218e19ec.zip
SCons-70e8cf9245f069d4eba070b6c8aa8fbe218e19ec.tar.gz
SCons-70e8cf9245f069d4eba070b6c8aa8fbe218e19ec.tar.bz2
Adjust sconsign tests for float timestamps
If a stat_result object's st_*time attributes are used, a float is returned instead of an int. Adjust sconsign test regexes to optionally accept a .digits tail of the number. Confirmed this works for both indexed attributes (which return an int) and named attributes (float). Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test')
-rw-r--r--test/sconsign/script/Configure.py6
-rw-r--r--test/sconsign/script/SConsignFile.py208
-rw-r--r--test/sconsign/script/Signatures.py24
-rw-r--r--test/sconsign/script/dblite.py24
-rw-r--r--test/sconsign/script/no-SConsignFile.py124
5 files changed, 193 insertions, 193 deletions
diff --git a/test/sconsign/script/Configure.py b/test/sconsign/script/Configure.py
index 2e1e9c1..6b064b1 100644
--- a/test/sconsign/script/Configure.py
+++ b/test/sconsign/script/Configure.py
@@ -76,16 +76,16 @@ _sconf_temp_conftest_0_c = '.sconf_temp/conftest_%(sig_re)s_0.c'%locals()
# Value node being printed actually begins with a newline. It would
# probably be good to change that to a repr() of the contents.
expect = r"""=== .:
-SConstruct: None \d+ \d+
+SConstruct: None \d+(\.\d*)? \d+
=== .sconf_temp:
conftest_%(sig_re)s_0.c:
- '.*':
+ '.*':\s
#include "math.h"
%(sig_re)s \[.*\]
conftest_%(sig_re)s_0_%(sig_re)s%(_obj)s:
- %(_sconf_temp_conftest_0_c)s: %(sig_re)s \d+ \d+
+ %(_sconf_temp_conftest_0_c)s: %(sig_re)s \d+(\.\d*)? \d+
%(CC)s: %(sig_re)s None None
%(sig_re)s \[.*\]
=== %(CC_dir)s:
diff --git a/test/sconsign/script/SConsignFile.py b/test/sconsign/script/SConsignFile.py
index 680eae5..6361ff3 100644
--- a/test/sconsign/script/SConsignFile.py
+++ b/test/sconsign/script/SConsignFile.py
@@ -164,160 +164,160 @@ database_name = test.get_sconsignname()
test.run_sconsign(arguments=database_name,
stdout=r"""=== .:
-SConstruct: None \d+ \d+
-fake_cc\.py: %(sig_re)s \d+ \d+
-fake_link\.py: %(sig_re)s \d+ \d+
+SConstruct: None \d+(\.\d*)? \d+
+fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
+fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
=== sub1:
-hello.c: %(sig_re)s \d+ \d+
-hello.exe: %(sig_re)s \d+ \d+
- %(sub1_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: %(sig_re)s \d+ \d+
+hello.c: %(sig_re)s \d+(\.\d*)? \d+
+hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
=== sub2:
-hello.c: %(sig_re)s \d+ \d+
-hello.exe: %(sig_re)s \d+ \d+
- %(sub2_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: %(sig_re)s \d+ \d+
+hello.c: %(sig_re)s \d+(\.\d*)? \d+
+hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub2_hello_c)s: %(sig_re)s \d+ \d+
- %(sub2_inc1_h)s: %(sig_re)s \d+ \d+
- %(sub2_inc2_h)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc1_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc2_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-inc1.h: %(sig_re)s \d+ \d+
-inc2.h: %(sig_re)s \d+ \d+
+inc1.h: %(sig_re)s \d+(\.\d*)? \d+
+inc2.h: %(sig_re)s \d+(\.\d*)? \d+
""" % locals())
test.run_sconsign(arguments="--raw " + database_name,
stdout=r"""=== .:
-SConstruct: {'csig': None, 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
-fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
-fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+SConstruct: {'csig': None, 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
=== sub1:
-hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
-hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
=== sub2:
-hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
-hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub2_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub2_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub2_inc1_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub2_inc2_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_inc1_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub2_inc2_h)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-inc1.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
-inc2.h: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+inc1.h: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+inc2.h: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
""" % locals())
expect = r"""=== .:
SConstruct:
csig: None
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_cc\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_link\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
=== sub1:
hello.c:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
hello.exe:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
implicit:
%(sub1_hello_obj)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_link\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
action: %(sig_re)s \[.*\]
hello.obj:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
implicit:
%(sub1_hello_c)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_cc\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
action: %(sig_re)s \[.*\]
=== sub2:
hello.c:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
hello.exe:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
implicit:
%(sub2_hello_obj)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_link\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
action: %(sig_re)s \[.*\]
hello.obj:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
implicit:
%(sub2_hello_c)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
%(sub2_inc1_h)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
%(sub2_inc2_h)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_cc\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
action: %(sig_re)s \[.*\]
inc1.h:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
inc2.h:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
""" % locals()
@@ -382,44 +382,44 @@ inc2.h:
test.run_sconsign(arguments="-t -v " + database_name,
stdout=r"""=== .:
SConstruct:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
fake_cc\.py:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
fake_link\.py:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
=== sub1:
hello.c:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
hello.exe:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
hello.obj:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
=== sub2:
hello.c:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
hello.exe:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
hello.obj:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
inc1.h:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
inc2.h:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
""")
test.run_sconsign(arguments="-e hello.obj " + database_name,
stdout=r"""=== .:
=== sub1:
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
=== sub2:
-hello.obj: %(sig_re)s \d+ \d+
- %(sub2_hello_c)s: %(sig_re)s \d+ \d+
- %(sub2_inc1_h)s: %(sig_re)s \d+ \d+
- %(sub2_inc2_h)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc1_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc2_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals(),
stderr=r"""sconsign: no entry `hello\.obj' in `\.'
@@ -428,34 +428,34 @@ hello.obj: %(sig_re)s \d+ \d+
test.run_sconsign(arguments="-e hello.obj -e hello.exe -e hello.obj " + database_name,
stdout=r"""=== .:
=== sub1:
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.exe: %(sig_re)s \d+ \d+
- %(sub1_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: %(sig_re)s \d+ \d+
+hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
=== sub2:
-hello.obj: %(sig_re)s \d+ \d+
- %(sub2_hello_c)s: %(sig_re)s \d+ \d+
- %(sub2_inc1_h)s: %(sig_re)s \d+ \d+
- %(sub2_inc2_h)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc1_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc2_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.exe: %(sig_re)s \d+ \d+
- %(sub2_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: %(sig_re)s \d+ \d+
+hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub2_hello_c)s: %(sig_re)s \d+ \d+
- %(sub2_inc1_h)s: %(sig_re)s \d+ \d+
- %(sub2_inc2_h)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc1_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc2_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals(),
stderr=r"""sconsign: no entry `hello\.obj' in `\.'
diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py
index 2225f83..a355068 100644
--- a/test/sconsign/script/Signatures.py
+++ b/test/sconsign/script/Signatures.py
@@ -169,26 +169,26 @@ database_name = test.get_sconsignname()
test.run_sconsign(
arguments=f"-e hello.exe -e hello.obj sub1/{database_name}",
- stdout=r"""hello.exe: %(sig_re)s \d+ \d+
- %(sub1_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: None \d+ \d+
+ stdout=r"""hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: None \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: None \d+ \d+
- fake_cc\.py: None \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: None \d+(\.\d*)? \d+
+ fake_cc\.py: None \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals(),
)
test.run_sconsign(
arguments=f"-e hello.exe -e hello.obj -r sub1/{database_name}",
- stdout=r"""hello.exe: %(sig_re)s '%(date_re)s' \d+
- %(sub1_hello_obj)s: %(sig_re)s '%(date_re)s' \d+
- fake_link\.py: None '%(date_re)s' \d+
+ stdout=r"""hello.exe: %(sig_re)s '%(date_re)s' \d+(\.\d*)?
+ %(sub1_hello_obj)s: %(sig_re)s '%(date_re)s' \d+(\.\d*)?
+ fake_link\.py: None '%(date_re)s' \d+(\.\d*)?
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s '%(date_re)s' \d+
- %(sub1_hello_c)s: None '%(date_re)s' \d+
- fake_cc\.py: None '%(date_re)s' \d+
+hello.obj: %(sig_re)s '%(date_re)s' \d+(\.\d*)?
+ %(sub1_hello_c)s: None '%(date_re)s' \d+(\.\d*)?
+ fake_cc\.py: None '%(date_re)s' \d+(\.\d*)?
%(sig_re)s \[.*\]
""" % locals(),
)
diff --git a/test/sconsign/script/dblite.py b/test/sconsign/script/dblite.py
index 24d8403..0d05d55 100644
--- a/test/sconsign/script/dblite.py
+++ b/test/sconsign/script/dblite.py
@@ -116,24 +116,24 @@ else:
manifest = ''
expect = r"""=== sub1:
-hello%(_exe)s: %(sig_re)s \d+ \d+
- %(sub1_hello_obj)s: %(sig_re)s \d+ \d+
- %(LINK)s: None \d+ \d+
+hello%(_exe)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(LINK)s: None \d+(\.\d*)? \d+
%(sig_re)s \[.*%(manifest)s\]
-hello%(_obj)s: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: None \d+ \d+
- %(CC)s: None \d+ \d+
+hello%(_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: None \d+(\.\d*)? \d+
+ %(CC)s: None \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals()
expect_r = r"""=== sub1:
-hello%(_exe)s: %(sig_re)s '%(date_re)s' \d+
- %(sub1_hello_obj)s: %(sig_re)s '%(date_re)s' \d+
- %(LINK)s: None '%(date_re)s' \d+
+hello%(_exe)s: %(sig_re)s '%(date_re)s' \d+(\.\d*)?
+ %(sub1_hello_obj)s: %(sig_re)s '%(date_re)s' \d+(\.\d*)?
+ %(LINK)s: None '%(date_re)s' \d+(\.\d*)?
%(sig_re)s \[.*%(manifest)s\]
-hello%(_obj)s: %(sig_re)s '%(date_re)s' \d+
- %(sub1_hello_c)s: None '%(date_re)s' \d+
- %(CC)s: None '%(date_re)s' \d+
+hello%(_obj)s: %(sig_re)s '%(date_re)s' \d+(\.\d*)?
+ %(sub1_hello_c)s: None '%(date_re)s' \d+(\.\d*)?
+ %(CC)s: None '%(date_re)s' \d+(\.\d*)?
%(sig_re)s \[.*\]
""" % locals()
diff --git a/test/sconsign/script/no-SConsignFile.py b/test/sconsign/script/no-SConsignFile.py
index 7a41c72..5760bf2 100644
--- a/test/sconsign/script/no-SConsignFile.py
+++ b/test/sconsign/script/no-SConsignFile.py
@@ -168,62 +168,62 @@ test.run(arguments = '--implicit-cache --tree=prune .')
sig_re = r'[0-9a-fA-F]{32,64}'
-expect = r"""hello.c: %(sig_re)s \d+ \d+
-hello.exe: %(sig_re)s \d+ \d+
- %(sub1_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: %(sig_re)s \d+ \d+
+expect = r"""hello.c: %(sig_re)s \d+(\.\d*)? \d+
+hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals()
test.run_sconsign(arguments = f"sub1/{database_name}", stdout=expect)
test.run_sconsign(arguments = f"--raw sub1/{database_name}",
- stdout = r"""hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
-hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+ stdout = r"""hello.c: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+hello.exe: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_obj)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ fake_link\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
-hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
- fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+L?, 'size': \d+L?, '_version_id': 2}
+hello.obj: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ %(sub1_hello_c)s: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
+ fake_cc\.py: {'csig': '%(sig_re)s', 'timestamp': \d+(\.\d*)?L?, 'size': \d+L?, '_version_id': 2}
%(sig_re)s \[.*\]
""" % locals())
test.run_sconsign(arguments = f"-v sub1/{database_name}",
stdout = r"""hello.c:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
hello.exe:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
implicit:
%(sub1_hello_obj)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_link\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
action: %(sig_re)s \[.*\]
hello.obj:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
implicit:
%(sub1_hello_c)s:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
fake_cc\.py:
csig: %(sig_re)s
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
size: \d+
action: %(sig_re)s \[.*\]
""" % locals())
@@ -248,73 +248,73 @@ hello.obj:
test.run_sconsign(arguments = f"-t -v sub1/{database_name}",
stdout = r"""hello.c:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
hello.exe:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
hello.obj:
- timestamp: \d+
+ timestamp: \d+(\.\d*)?
""" % locals())
test.run_sconsign(arguments = f"-e hello.obj sub1/{database_name}",
- stdout = r"""hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+ stdout = r"""hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals())
test.run_sconsign(arguments = f"-e hello.obj -e hello.exe -e hello.obj sub1/{database_name}",
- stdout = r"""hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+ stdout = r"""hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.exe: %(sig_re)s \d+ \d+
- %(sub1_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: %(sig_re)s \d+ \d+
+hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals())
test.run_sconsign(arguments = f"sub2/{database_name}",
- stdout = r"""hello.c: %(sig_re)s \d+ \d+
-hello.exe: %(sig_re)s \d+ \d+
- %(sub2_hello_obj)s: %(sig_re)s \d+ \d+
- fake_link\.py: %(sig_re)s \d+ \d+
+ stdout = r"""hello.c: %(sig_re)s \d+(\.\d*)? \d+
+hello.exe: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_obj)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_link\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub2_hello_c)s: %(sig_re)s \d+ \d+
- %(sub2_inc1_h)s: %(sig_re)s \d+ \d+
- %(sub2_inc2_h)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc1_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc2_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-inc1.h: %(sig_re)s \d+ \d+
-inc2.h: %(sig_re)s \d+ \d+
+inc1.h: %(sig_re)s \d+(\.\d*)? \d+
+inc2.h: %(sig_re)s \d+(\.\d*)? \d+
""" % locals())
#test.run_sconsign(arguments = "-i -v sub2/{}".format(database_name),
-# stdout = r"""hello.c: %(sig_re)s \d+ \d+
-#hello.exe: %(sig_re)s \d+ \d+
+# stdout = r"""hello.c: %(sig_re)s \d+(\.\d*)? \d+
+#hello.exe: %(sig_re)s \d+(\.\d*)? \d+
# implicit:
-# hello.obj: %(sig_re)s \d+ \d+
-#hello.obj: %(sig_re)s \d+ \d+
+# hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+#hello.obj: %(sig_re)s \d+(\.\d*)? \d+
# implicit:
-# hello.c: %(sig_re)s \d+ \d+
-# inc1.h: %(sig_re)s \d+ \d+
-# inc2.h: %(sig_re)s \d+ \d+
+# hello.c: %(sig_re)s \d+(\.\d*)? \d+
+# inc1.h: %(sig_re)s \d+(\.\d*)? \d+
+# inc2.h: %(sig_re)s \d+(\.\d*)? \d+
#""" % locals())
test.run_sconsign(arguments = f"-e hello.obj sub2/{database_name} sub1/{database_name}",
- stdout = r"""hello.obj: %(sig_re)s \d+ \d+
- %(sub2_hello_c)s: %(sig_re)s \d+ \d+
- %(sub2_inc1_h)s: %(sig_re)s \d+ \d+
- %(sub2_inc2_h)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+ stdout = r"""hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc1_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub2_inc2_h)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
-hello.obj: %(sig_re)s \d+ \d+
- %(sub1_hello_c)s: %(sig_re)s \d+ \d+
- fake_cc\.py: %(sig_re)s \d+ \d+
+hello.obj: %(sig_re)s \d+(\.\d*)? \d+
+ %(sub1_hello_c)s: %(sig_re)s \d+(\.\d*)? \d+
+ fake_cc\.py: %(sig_re)s \d+(\.\d*)? \d+
%(sig_re)s \[.*\]
""" % locals())