summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Gross <grossag@vmware.com>2020-06-29 17:25:35 (GMT)
committerAdam Gross <grossag@vmware.com>2020-08-04 13:08:13 (GMT)
commitc334cabeb91e04efd3175f6a15aceb11ae836e1e (patch)
tree2293a6c6018e4303d93c7ba5bf9d547f2afb6e83
parentd6ba07ce6049a44060422173f5b3c92dda6db60d (diff)
downloadSCons-c334cabeb91e04efd3175f6a15aceb11ae836e1e.zip
SCons-c334cabeb91e04efd3175f6a15aceb11ae836e1e.tar.gz
SCons-c334cabeb91e04efd3175f6a15aceb11ae836e1e.tar.bz2
Two small changes to the test case
1. Remove unnecessary writes of f1.in and f2.in. The former is already in the dir fixture and the latter is unused. 2. Untabify SConstruct file.
-rw-r--r--test/option/hash-format.py2
-rw-r--r--test/option/hash-format/SConstruct28
2 files changed, 14 insertions, 16 deletions
diff --git a/test/option/hash-format.py b/test/option/hash-format.py
index 5dfa45d..ca0ec63 100644
--- a/test/option/hash-format.py
+++ b/test/option/hash-format.py
@@ -29,8 +29,6 @@ import TestSCons
test = TestSCons.TestSCons()
test.dir_fixture('hash-format')
-test.write('f1.in', str(list(range(10))))
-test.write('f2.in', str(list(range(100000))))
# Test passing the hash format by command-line.
for algorithm in ['md5', 'sha1', 'sha256']:
diff --git a/test/option/hash-format/SConstruct b/test/option/hash-format/SConstruct
index 07713ac..8d600d7 100644
--- a/test/option/hash-format/SConstruct
+++ b/test/option/hash-format/SConstruct
@@ -3,9 +3,9 @@ import sys
hash_format = GetOption('hash_format')
if not hash_format:
- # Override to SHA-256 to validate that override is effective
- hash_format = 'sha256'
- SetOption('hash_format', hash_format)
+ # Override to SHA-256 to validate that override is effective
+ hash_format = 'sha256'
+ SetOption('hash_format', hash_format)
DefaultEnvironment(tools=[])
B = Builder(action = r'$PYTHON build.py $TARGETS $SOURCES')
@@ -14,14 +14,14 @@ env['PYTHON'] = sys.executable
f1 = env.B(target = 'f1.out', source = 'f1.in')
def VerifyCsig():
- csig = f1[0].get_csig()
- if hash_format == 'md5':
- assert csig == 'fe06ae4170d4fead2c958439c738859e', csig
- elif hash_format == 'sha1':
- assert csig == 'efe5c6daa743540e9561934e3e18628b336013f7', csig
- elif hash_format == 'sha256':
- assert csig == 'a28bb79aa5ca8a5eb2dc5910a103d1a6312e79d73ed8054787cee78cc532a6aa', csig
- else:
- raise Exception('Hash format %s is not supported in '
- 'test/option/hash-format/SConstruct' % hash_format)
-atexit.register(VerifyCsig) \ No newline at end of file
+ csig = f1[0].get_csig()
+ if hash_format == 'md5':
+ assert csig == 'fe06ae4170d4fead2c958439c738859e', csig
+ elif hash_format == 'sha1':
+ assert csig == 'efe5c6daa743540e9561934e3e18628b336013f7', csig
+ elif hash_format == 'sha256':
+ assert csig == 'a28bb79aa5ca8a5eb2dc5910a103d1a6312e79d73ed8054787cee78cc532a6aa', csig
+ else:
+ raise Exception('Hash format %s is not supported in '
+ 'test/option/hash-format/SConstruct' % hash_format)
+atexit.register(VerifyCsig)