Anonymous avatar Anonymous committed 06322cd

Add command-line processing for all options (with tests).

Comments (0)

Files changed (39)

doc/man/options.sgml

     </listitem>
   </varlistentry>
 
+ <!--
+
   <varlistentry>
     <term>
-     <option>--debug</option>=<replaceable>flags</replaceable>
+     <option>- -debug</option>=<replaceable>flags</replaceable>
     </term>
     <listitem>
       <para>
     </listitem>
   </varlistentry>
 
+ -->
+
+ <!--
+
   <varlistentry>
     <term> <option>-e</option>,
-     <option>--environment-overrides</option>
+     <option>- -environment-overrides</option>
     </term>
     <listitem>
       <para>
     </listitem>
   </varlistentry>
 
+ -->
+
   <varlistentry>
     <term>
       <option>-f</option> <replaceable>file</replaceable>,
     <listitem>
       <para>
 
-        Print command-line help message and exit.
+        Print a local help message for this build, if one is defined in
+        the configuration file(s), plus a line that describes the -H
+        option for command-line option help.  If no local help message
+        is defined, prints the standard help message about command-line
+        options.  Exits after displaying the appropriate message.
 
       </para>
     </listitem>
   <varlistentry>
     <term>
       <option>-H</option>,
-      <option>--help-local</option>,
-      <option>--local-help</option>
+      <option>--help-options</option>
     </term>
     <listitem>
       <para>
 
-        Display a local help message for this build, if one is defined in
-        the configuration file(s).
+        Print the standard help message about command-line options and
+        exit.
 
       </para>
     </listitem>
     </listitem>
   </varlistentry>
 
+ <!--
+
   <varlistentry>
     <term>
       <option>-l</option>,
-      <option>--load-average</option>=<replaceable>N</replaceable>,
-      <option>--max-load</option>=<replaceable>N</replaceable>
+      <option>- -load-average</option>=<replaceable>N</replaceable>,
+      <option>- -max-load</option>=<replaceable>N</replaceable>
     </term>
     <listitem>
       <para>
 	average is at least <replaceable>N</replaceable>
 	(a floating-point number).
 
-	<!--
+	<!- -
         ???
 	With no argument, removes a previous load limit.
-	-->
+	- ->
 
       </para>
     </listitem>
   </varlistentry>
 
+ -->
+
+ <!--
+
   <varlistentry>
     <term>
-      <option>--list-derived</option>
+      <option>- -list-derived</option>
     </term>
     <listitem>
       <para>
 
   <varlistentry>
     <term>
-      <option>--list-actions</option>
+      <option>- -list-actions</option>
     </term>
     <listitem>
       <para>
 
   <varlistentry>
     <term>
-      <option>--list-where</option>
+      <option>- -list-where</option>
     </term>
     <listitem>
       <para>
     </listitem>
   </varlistentry>
 
+ -->
+
   <varlistentry>
     <term>
       <option>-m</option>
     </listitem>
   </varlistentry>
 
+ <!--
+
   <varlistentry>
     <term>
       <option>-o</option> <replaceable>file</replaceable>,
-      <option>--old-file</option>=<replaceable>file</replaceable>,
-      <option>--assume-old</option>=<replaceable>file</replaceable>
+      <option>- -old-file</option>=<replaceable>file</replaceable>,
+      <option>- -assume-old</option>=<replaceable>file</replaceable>
     </term>
     <listitem>
       <para>
     </listitem>
   </varlistentry>
 
+ -->
+
  <!--
 
   <varlistentry>
 
  -->
 
+ <!--
+
   <varlistentry>
     <term>
       <option>-q</option>,
-      <option>--question</option>
+      <option>- -question</option>
     </term>
     <listitem>
       <para>
     </listitem>
   </varlistentry>
 
+ -->
+
  <!--
 
   <varlistentry>
     <term>
       <option>-r</option>,
+      <option>-R</option>,
       <option>- -no-builtin-rules</option>,
-      <option>-R</option>,
       <option>- -no-builtin-variables</option>
     </term>
     <listitem>
 
  -->
 
+ <!--
+
   <varlistentry>
     <term>
-      <option>--random</option>
+      <option>- -random</option>
     </term>
     <listitem>
       <para>
     </listitem>
   </varlistentry>
 
+ -->
+
   <varlistentry>
     <term>
       <option>-s</option>,
 
   <varlistentry>
     <term>
-      <option>-t</option>
+      <option>-t</option>,
+      <option>--touch</option>
     </term>
     <listitem>
       <para>
 
   <varlistentry>
     <term>
-      <option>-v</option>
+      <option>-v</option>,
+      <option>--version</option>,
     </term>
     <listitem>
       <para>
 
  -->
 
+ <!--
+
   <varlistentry>
     <term>
-      <option>--warn-undefined-variables</option>
+      <option>- -warn-undefined-variables</option>
     </term>
     <listitem>
       <para>
     </listitem>
   </varlistentry>
 
+ -->
+
  <!--
 
   <varlistentry>
 
 # Global variables
 
+local_help = None
+num_jobs = 1
 Scripts = []
 
 # utility functions
     traceback.print_exc()
 
 
-def PrintUsage():
-    print "Usage: scons [OPTION]... TARGET..."
-    print "Build TARGET or multiple TARGET(s)"
-    print " "
-    print '  -f CONSCRIPT        execute CONSCRIPT instead of "SConstruct"'
-    print "  -j N                execute N parallel jobs"
-    print "  --help              print this message and exit"
 
 def Conscript(filename):
+    global Scripts
     Scripts.append(filename)
 
-def main():
+def Help(text):
+    global local_help
+    if local_help:
+	print text
+	print "Use scons -H for help about command-line options."
+	sys.exit(0)
+
+
+option_list = []
+
+# Generic routine for to-be-written options, used by multiple options below.
+
+def opt_not_yet(opt, arg):
+    sys.stderr.write("Warning:  the %s option is not yet implemented\n" % opt)
+
+class Option:
+    """Class for command-line option information.
+
+    This exists to provide a central location for everything
+    describing a command-line option, so that we can change
+    options without having to update the code to handle the
+    option in one place, the -h help message in another place,
+    etc.  There are no methods here, only attributes.
+
+    You can initialize an Option with the following:
+
+	func	The function that will be called when this
+		option is processed on the command line.
+		Calling sequence is:
+
+			func(opt, arg)
+
+		If there is no func, then this Option probably
+		stores an optstring to be printed.
+
+	helpline
+		The string to be printed in -h output.  If no
+		helpline is specified but a help string is
+		specified (the usual case), a helpline will be
+		constructed automatically from the short, long,
+		arg, and help attributes.  (In practice, then,
+		setting helpline without setting func allows you
+		to print arbitrary lines of text in the -h
+		output.)
+
+	short	The string for short, single-hyphen
+		command-line options.
+		Do not include the hyphen:
+
+			'a' for -a, 'xy' for -x and -y, etc.
+
+	long	An array of strings for long, double-hyphen
+		command-line options.  Do not include
+		the hyphens:
+
+			['my-option', 'verbose']
+
+	arg	If this option takes an argument, this string
+		specifies how you want it to appear in the
+		-h output ('DIRECTORY', 'FILE', etc.).
+
+	help	The help string that will be printed for
+		this option in the -h output.  Must be
+		49 characters or fewer.
+
+	future	If non-zero, this indicates that this feature
+		will be supported in a future release, not
+		the currently planned one.  SCons will
+		recognize the option, but it won't show up
+		in the -h output.
+
+    The following attribute is derived from the supplied attributes:
+
+	optstring
+		A string, with hyphens, describing the flags
+		for this option, as constructed from the
+		specified short, long and arg attributes.
+
+    All Option objects are stored in the global option_list list,
+    in the order in which they're created.  This is the list
+    that's used to generate -h output, so the order in which the
+    objects are created is the order in which they're printed.
+
+    The upshot is that specifying a command-line option and having
+    everything work correctly is a matter of defining a function to
+    process its command-line argument (set the right flag, update
+    the right value), and then creating an appropriate Option object
+    at the correct point in the code below.
+    """
+
+    def __init__(self, func = None, helpline = None,
+		 short = None, long = None, arg = None,
+		 help = None, future = None):
+	self.func = func
+	self.short = short
+	self.long = long
+	self.arg = arg
+	self.help = help
+	opts = []
+	if self.short:
+	    for c in self.short:
+		if arg:
+		    c = c + " " + arg
+		opts = opts + ['-' + c]
+	if self.long:
+	    l = self.long
+	    if arg:
+		l = map(lambda x,a=arg: x + "=" + a, self.long)
+	    opts = opts + map(lambda x: '--' + x, l)
+	self.optstring = string.join(opts, ', ')
+	if helpline:
+	    self.helpline = helpline
+	elif help and not future:
+	    if len(self.optstring) <= 26:
+		sep = " " * (28 - len(self.optstring))
+	    else:
+		sep = self.helpstring = "\n" + " " * 30
+	    self.helpline = "  " + self.optstring + sep + self.help
+	else:
+	    self.helpline = None
+	global option_list
+	option_list.append(self)
+
+# In the following instantiations, the help string should be no
+# longer than 49 characters.  Use the following as a guide:
+#	help = "1234567890123456789012345678901234567890123456789"
+
+def opt_ignore(opt, arg):
+    sys.stderr.write("Warning:  ignoring %s option\n" % opt)
+
+Option(func = opt_ignore,
+	short = 'bmSt', long = ['no-keep-going', 'stop', 'touch'],
+	help = "Ignored for compatibility.")
+
+Option(func = opt_not_yet,
+	short = 'c', long = ['clean', 'remove'],
+	help = "Remove specified targets and dependencies.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['cache-disable', 'no-cache'],
+	help = "Do not retrieve built targets from Cache.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['cache-force', 'cache-populate'],
+	help = "Copy already-built targets into the Cache.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['cache-show'],
+	help = "Print what would have built Cached targets.")
+
+Option(func = opt_not_yet,
+	short = 'C', long = ['directory'], arg = 'DIRECTORY',
+	help = "Change to DIRECTORY before doing anything.")
+
+Option(func = opt_not_yet,
+	short = 'd',
+	help = "Print file dependency information.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['debug'], arg = 'FLAGS',
+	help = "Print various types of debugging information.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'e', long = ['environment-overrides'],
+	help = "Environment variables override makefiles.")
+
+def opt_f(opt, arg):
     global Scripts
+    Scripts.append(arg)
 
+Option(func = opt_f,
+	short = 'f', long = ['file', 'makefile', 'sconstruct'], arg = 'FILE',
+	help = "Read FILE as the top-level SConstruct file.")
+
+def opt_help(opt, arg):
+    global local_help
+    local_help = 1
+
+Option(func = opt_help,
+	short = 'h', long = ['help'],
+	help = "Print defined help message, or this one.")
+
+def opt_help_options(opt, arg):
+    PrintUsage()
+    sys.exit(0)
+
+Option(func = opt_help_options,
+	short = 'H', long = ['help-options'],
+	help = "Print this message and exit.")
+
+Option(func = opt_not_yet,
+	short = 'i', long = ['ignore-errors'],
+	help = "Ignore errors from build actions.")
+
+Option(func = opt_not_yet,
+	short = 'I', long = ['include-dir'], arg = 'DIRECTORY',
+	help = "Search DIRECTORY for imported Python modules.")
+
+def opt_j(opt, arg):
+    global num_jobs
     try:
-        opts, targets = getopt.getopt(sys.argv[1:], 'f:j:', ['help'])
-    except getopt.GetoptError, x:
-        print x
+        num_jobs = int(arg)
+    except:
         PrintUsage()
         sys.exit(1)
 
-    num_jobs = 1
-    for o, a in opts:
-        if o == '-f': Scripts.append(a)
+    if num_jobs <= 0:
+        PrintUsage()
+        sys.exit(1)
 
-        if o == '-j':
-            try:
-                num_jobs = int(a)
-            except:
-                PrintUsage()
-                sys.exit(1)
+Option(func = opt_j,
+	short = 'j', long = ['jobs'], arg = 'N',
+	help = "Allow N jobs at once.")
 
-            if num_jobs <= 0:
-                PrintUsage()
-                sys.exit(1)
+Option(func = opt_not_yet,
+	short = 'k', long = ['keep-going'],
+	help = "Keep going when a target can't be made.")
 
-        if o == '--help':
-            PrintUsage()
-            sys.exit(0)
+Option(func = opt_not_yet, future = 1,
+	short = 'l', long = ['load-average', 'max-load'], arg = 'N',
+	help = "Don't start multiple jobs unless load is below N.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['list-derived'],
+	help = "Don't build; list files that would be built.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['list-actions'],
+	help = "Don't build; list files and build actions.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['list-where'],
+	help = "Don't build; list files and where defined.")
+
+Option(func = opt_not_yet,
+	short = 'n', long = ['no-exec', 'just-print', 'dry-run', 'recon'],
+	help = "Don't build; just print commands.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'o', long = ['old-file', 'assume-old'], arg = 'FILE',
+	help = "Consider FILE to be old; don't rebuild it.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['override'], arg = 'FILE',
+	help = "Override variables as specified in FILE.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'p',
+	help = "Print internal environments/objects.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'q', long = ['question'],
+	help = "Don't build; exit status says if up to date.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'rR', long = ['no-builtin-rules', 'no-builtin-variables'],
+	help = "Clear default environments and variables.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['random'],
+	help = "Build dependencies in random order.")
+
+Option(func = opt_not_yet,
+	short = 's', long = ['silent', 'quiet'],
+	help = "Don't print commands.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'u', long = ['up', 'search-up'],
+	help = "Search up directory tree for SConstruct.")
+
+Option(func = opt_not_yet,
+	short = 'v', long = ['version'],
+	help = "Print the SCons version number and exit.")
+
+Option(func = opt_not_yet,
+	short = 'w', long = ['print-directory'],
+	help = "Print the current directory.")
+
+Option(func = opt_not_yet,
+	long = ['no-print-directory'],
+	help = "Turn off -w, even if it was turned on implicitly.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['write-filenames'], arg = 'FILE',
+	help = "Write all filenames examined into FILE.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'W', long = ['what-if', 'new-file', 'assume-new'], arg = 'FILE',
+	help = "Consider FILE to be changed.")
+
+Option(func = opt_not_yet, future = 1,
+	long = ['warn-undefined-variables'],
+	help = "Warn when an undefined variable is referenced.")
+
+Option(func = opt_not_yet, future = 1,
+	short = 'Y', long = ['repository'], arg = 'REPOSITORY',
+	help = "Search REPOSITORY for source and target files.")
+
+short_opts = ""
+long_opts = []
+opt_func = {}
+
+for o in option_list:
+    if o.short:
+	if o.func:
+	    for c in o.short:
+		opt_func['-' + c] = o.func
+	short_opts = short_opts + o.short
+	if o.arg:
+	    short_opts = short_opts + ":"
+    if o.long:
+	if o.func:
+	    for l in o.long:
+		opt_func['--' + l] = o.func
+	if o.arg:
+	    long_opts = long_opts + map(lambda a: a + "=", o.long)
+	else:
+	    long_opts = long_opts + o.long
+
+
+
+def PrintUsage():
+    print "Usage: scons [OPTION] [TARGET] ..."
+    print "Options:"
+    for o in option_list:
+	if o.helpline:
+	    print o.helpline
+
+
+
+def main():
+    global Scripts, local_help, num_jobs
+
+    try:
+	cmd_opts, targets = getopt.getopt(sys.argv[1:], short_opts, long_opts)
+#   except getopt.GetoptError, x:
+    except:
+        #print x
+        PrintUsage()
+        sys.exit(1)
+
+    for opt, arg in cmd_opts:
+	opt_func[opt](opt, arg)
 
     if not Scripts:
         Scripts.append('SConstruct')
 
+    if local_help and not os.path.isfile(Scripts[0]):
+	# They specified -h, but there's no SConstruct.  Give them
+	# the options usage before we try to read it and fail.
+	PrintUsage()
+	sys.exit(0)
 
     # XXX The commented-out code here adds any "scons" subdirs in anything
     # along sys.path to sys.path.  This was an attempt at setting up things
         file, Scripts = Scripts[0], Scripts[1:]
         execfile(file)
 
+    if local_help:
+	# They specified -h, but there was no Help() inside the
+	# SConscript files.  Give them the options usage.
+	PrintUsage()
+	sys.exit(0)
+
     taskmaster = Taskmaster(map(lambda x: lookup(File, x), targets))
 
     jobs = scons.Job.Jobs(num_jobs, taskmaster)

test/option--C.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--C.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-C foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -C option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--directory=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --directory option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--H.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--H.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-H')
+
+test.fail_test(string.find(test.stdout(), '-H, --help-options') == -1)
+
+test.pass_test()
+ 

test/option--I.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--I.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-I foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -I option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--include-dir=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --include-dir option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--R.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--R.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-R')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -R option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--no-builtin-variables')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --no-builtin-variables option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--S.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--S.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-S')
+
+test.fail_test(test.stderr() !=
+		"Warning:  ignoring -S option\n")
+
+test.run(chdir = '.', arguments = '--no-keep-going')
+
+test.fail_test(test.stderr() !=
+		"Warning:  ignoring --no-keep-going option\n")
+
+test.run(chdir = '.', arguments = '--stop')
+
+test.fail_test(test.stderr() !=
+		"Warning:  ignoring --stop option\n")
+
+test.pass_test()
+ 

test/option--W.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--W.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-W foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -W option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--what-if=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --what-if option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--new-file=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --new-file option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--assume-new=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --assume-new option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--Y.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--Y.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-Y foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -Y option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--repository=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --repository option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--cd.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--cd.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--cache-disable')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --cache-disable option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--no-cache')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --no-cache option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--cf.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--cf.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--cache-force')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --cache-force option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--cache-populate')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --cache-populate option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--cs.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--cs.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--cache-show')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --cache-show option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--la.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--la.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--list-actions')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --list-actions option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--ld.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--ld.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--list-derived')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --list-derived option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--lw.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--lw.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--list-where')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --list-where option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--npd.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--npd.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--no-print-directory')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --no-print-directory option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--override.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--override.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--override=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --override option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--random.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--random.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--random')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --random option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--wf.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--wf.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--write-filenames=FILE')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --write-filenames option is not yet implemented\n")
+
+test.pass_test()
+ 

test/option--wuv.py

+#!/usr/bin/env python
+
+__revision__ = "test/option--wuv.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '--warn-undefined-variables')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --warn-undefined-variables option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-b.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-b')
+
+test.fail_test(test.stderr() !=
+		"Warning:  ignoring -b option\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-c.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-c')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -c option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--clean')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --clean option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--remove')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --remove option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-d.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-d')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -d option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-e.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-e')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -e option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--environment-overrides')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --environment-overrides option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-h.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.run(chdir = '.', arguments = '-h')
+
+test.fail_test(string.find(test.stdout(), '-h, --help') == -1)
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-h')
+
+test.fail_test(string.find(test.stdout(), '-h, --help') == -1)
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-i.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-i')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -i option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--ignore-errors')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --ignore-errors option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-k.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-k')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -k option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--keep-going')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --keep-going option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-l.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-l 1')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -l option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--load-average=1')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --load-average option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--max-load=1')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --max-load option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-m.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-m')
+
+test.fail_test(test.stderr() !=
+		"Warning:  ignoring -m option\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-n.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-n')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -n option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--no-exec')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --no-exec option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--just-print')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --just-print option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--dry-run')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --dry-run option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--recon')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --recon option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-o.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-o foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -o option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--old-file=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --old-file option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--assume-old=foo')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --assume-old option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-p.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-p')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -p option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-q.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-q')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -q option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--question')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --question option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-r.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-r')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -r option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--no-builtin-rules')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --no-builtin-rules option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-s.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-s')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -s option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--silent')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --silent option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--quiet')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --quiet option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-t.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-t')
+
+test.fail_test(test.stderr() !=
+		"Warning:  ignoring -t option\n")
+
+test.run(chdir = '.', arguments = '--touch')
+
+test.fail_test(test.stderr() !=
+		"Warning:  ignoring --touch option\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-u.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-u')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -u option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-v.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-v')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -v option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--version')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --version option is not yet implemented\n")
+
+test.pass_test()
+ 
+#!/usr/bin/env python
+
+__revision__ = "test/option-w.py __REVISION__ __DATE__ __DEVELOPER__"
+
+import TestCmd
+import string
+import sys
+
+test = TestCmd.TestCmd(program = 'scons.py',
+                       workdir = '',
+                       interpreter = 'python')
+
+test.write('SConstruct', "")
+
+test.run(chdir = '.', arguments = '-w')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the -w option is not yet implemented\n")
+
+test.run(chdir = '.', arguments = '--print-directory')
+
+test.fail_test(test.stderr() !=
+		"Warning:  the --print-directory option is not yet implemented\n")
+
+test.pass_test()
+ 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.