summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorfergus.henderson <fergushenderson@users.noreply.github.com>2008-07-30 22:56:39 +0000
committerfergus.henderson <fergushenderson@users.noreply.github.com>2008-07-30 22:56:39 +0000
commit7ac8448ba7d387c8d7c4388d3d9eba9466385769 (patch)
tree35368a4a98d2992002c4b78232df3d05bab6a82b /test
parent0404dc94da93fb52aa25a66f57c8c3a7838e2f40 (diff)
downloaddistcc-git-7ac8448ba7d387c8d7c4388d3d9eba9466385769.tar.gz
Add a test case to test "-MT" and "-MF" without spaces after them.
Some more bug fixes to make the test case pass. Also, make the DashWpMD_Case test a bit more strict: disable fallbacks, so that it tests that we can distribute such jobs.
Diffstat (limited to 'test')
-rwxr-xr-xtest/testdistcc.py23
1 files changed, 22 insertions, 1 deletions
diff --git a/test/testdistcc.py b/test/testdistcc.py
index bd2e3cd..6e6212d 100755
--- a/test/testdistcc.py
+++ b/test/testdistcc.py
@@ -1212,6 +1212,7 @@ class DashONoSpace_Case(CompileHello_Case):
else:
CompileHello_Case.runtest (self)
+
class WriteDevNull_Case(CompileHello_Case):
def runtest(self):
self.compile()
@@ -1378,11 +1379,30 @@ int main(void) {
def checkBuiltProgramMsgs(self, msgs):
self.assert_equal(msgs, "hello world\n")
+
+class DashMD_DashMF_DashMT_Case(CompileHello_Case):
+ """Test -MD -MFfoo -MTbar"""
+
+ def compileCmd(self):
+ return self.distcc_without_fallback() + _gcc + \
+ " -MD -MFdotd_filename -MTtarget_name_42 -o testtmp.o -c %s" % \
+ (self.sourceFilename())
+
+ def runtest(self):
+ try:
+ os.remove('dotd_filename')
+ except OSError:
+ pass
+ self.compile();
+ dotd_contents = open("dotd_filename").read()
+ self.assert_re_search("target_name_42", dotd_contents)
+
+
class DashWpMD_Case(CompileHello_Case):
"""Test -Wp,-MD,depfile"""
def compileCmd(self):
- return self.distcc() + _gcc + \
+ return self.distcc_without_fallback() + _gcc + \
" -c -Wp,-MD,depsfile -o testtmp.o testtmp.c"
def runtest(self):
@@ -1882,6 +1902,7 @@ tests = [
ScanArgs_Case,
ParseMask_Case,
DotD_Case,
+ DashMD_DashMF_DashMT_Case,
Compile_c_Case,
ImplicitCompilerScan_Case,
StripArgs_Case,