summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-03-23 05:45:01 (GMT)
committerSteven Knight <knight@baldmt.com>2003-03-23 05:45:01 (GMT)
commit8d8e5b7a7edcfb7ac3795977c33c7f6e561abdda (patch)
treeef97ab12a1213395403354c91f509dd9fb191fcf /test
parentbff7f4d25677f6d1543abe553e3b7a63dc910b0c (diff)
downloadSCons-8d8e5b7a7edcfb7ac3795977c33c7f6e561abdda.zip
SCons-8d8e5b7a7edcfb7ac3795977c33c7f6e561abdda.tar.gz
SCons-8d8e5b7a7edcfb7ac3795977c33c7f6e561abdda.tar.bz2
Fix -U when no Default() targets are specified.
Diffstat (limited to 'test')
-rw-r--r--test/option--U.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/option--U.py b/test/option--U.py
index 8abe7b9..f5a7b74 100644
--- a/test/option--U.py
+++ b/test/option--U.py
@@ -85,7 +85,10 @@ test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
test.unlink(['sub1', 'foo.out'])
test.write('SConscript', """assert GetLaunchDir() == r'%s'"""%test.workpath('sub1'))
-test.run(arguments = '-U', chdir = 'sub1', stderr = None, status = 2)
+test.run(arguments = '-U',
+ chdir = 'sub1',
+ stderr = "scons: *** No targets specified and no Default() targets found. Stop.\n",
+ status = 2)
test.fail_test(os.path.exists(test.workpath('sub1', 'foo.out')))
test.fail_test(os.path.exists(test.workpath('sub2', 'bar.out')))
test.fail_test(os.path.exists(test.workpath('sub2b', 'bar.out')))
@@ -133,7 +136,6 @@ test.fail_test(os.path.exists(test.workpath('sub3', 'baz.out')))
test.fail_test(os.path.exists(test.workpath('bar.out')))
test.fail_test(os.path.exists(test.workpath('sub2/xxx.out')))
-
# Make sure that a Default() directory doesn't cause an exception.
test.subdir('sub4')
@@ -143,6 +145,17 @@ Default('.')
test.run(chdir = 'sub4', arguments = '-U')
+# Make sure no Default() targets doesn't cause an exception.
+test.subdir('sub5')
+
+test.write(['sub5', 'SConstruct'], "\n")
+
+test.run(chdir = 'sub5',
+ arguments = '-U',
+ stderr = "scons: *** No targets specified and no Default() targets found. Stop.\n",
+ status = 2)
+
+#
test.write('SConstruct', """
Default('not_a_target.in')
""")