summaryrefslogtreecommitdiffstats
path: root/bin/SConsExamples.py
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2017-11-14 19:55:57 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2017-11-14 19:55:57 (GMT)
commit42b4f70c47b964d4c611247f4b9c24946aa2bbda (patch)
treef232ef48202041c1b2109cc758ff40047c7458a7 /bin/SConsExamples.py
parent09d25daebd47174963a5c3f159e0392bc00c88c0 (diff)
downloadSCons-42b4f70c47b964d4c611247f4b9c24946aa2bbda.zip
SCons-42b4f70c47b964d4c611247f4b9c24946aa2bbda.tar.gz
SCons-42b4f70c47b964d4c611247f4b9c24946aa2bbda.tar.bz2
Add ability to regenerate a single example output
Diffstat (limited to 'bin/SConsExamples.py')
-rw-r--r--bin/SConsExamples.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/SConsExamples.py b/bin/SConsExamples.py
index 50c4c1a..c09840c 100644
--- a/bin/SConsExamples.py
+++ b/bin/SConsExamples.py
@@ -305,6 +305,11 @@ def createAllExampleOutputs(dpath):
examples = readAllExampleInfos(dpath)
total = len(examples)
idx = 0
+
+ if len(sys.argv) > 1:
+ examples_to_run = sys.argv[1:]
+ examples = { k:v for k,v in examples.items() if k in examples_to_run }
+
for key, value in examples.items():
# Process all scons_output tags
print("%.2f%s (%d/%d) %s" % (float(idx + 1) * 100.0 / float(total),
@@ -763,8 +768,10 @@ def ExecuteCommand(args, c, t, dict):
def create_scons_output(e):
- # The real raison d'etre for this script, this is where we
- # actually execute SCons to fetch the output.
+ """
+ The real raison d'etre for this script, this is where we
+ actually execute SCons to fetch the output.
+ """
# Loop over all outputs for the example
for o in e.outputs: