populate EXAMPLE_DIRECTORIES variable in the configuration cache for use by test.py
authorTom Henderson <tomh@tomh.org>
Sun, 06 Sep 2015 22:19:22 -0700
changeset 11650 7f374ac3b2f8
parent 11649 d1bbecfd11d4
child 11651 feff0e88048b
populate EXAMPLE_DIRECTORIES variable in the configuration cache for use by test.py
wscript
--- a/wscript	Sun Sep 06 18:27:37 2015 +0200
+++ b/wscript	Sun Sep 06 22:19:22 2015 -0700
@@ -479,6 +479,13 @@
 
     conf.report_optional_feature("ENABLE_EXAMPLES", "Build examples", env['ENABLE_EXAMPLES'], 
                                  why_not_examples)
+    try:
+        for dir in os.listdir('examples'):
+            if dir.startswith('.') or dir == 'CVS':
+                continue
+            conf.env.append_value('EXAMPLE_DIRECTORIES', dir)
+    except OSError:
+        return
 
     env['VALGRIND_FOUND'] = False
     try: