[Lldb-commits] [lldb] r203253 - Fix test 'make clean' target for empty $(DSYM) on FreeBSD

2014-03-07 Thread Ed Maste
Author: emaste
Date: Fri Mar  7 11:20:50 2014
New Revision: 203253

URL: http://llvm.org/viewvc/llvm-project?rev=203253view=rev
Log:
Fix test 'make clean' target for empty $(DSYM) on FreeBSD

A freebsd issue with rm prevents '[g]make clean' from working if $(DSYM)
is empty (fts_open(3) fails if passed an empty argument).

To work around this, simplify the clean target by using three separate
rm invocations: one for the common files, one for the case of non-empty
$(DYLIB_NAME), and one for non-empty $(DSYM).

Issue diagnosed (and reported to FreeBSD) by John Wolfe.

llvm.org/pr17933

Modified:
lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
lldb/trunk/test/make/Makefile.rules

Modified: 
lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py?rev=203253r1=203252r2=203253view=diff
==
--- lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py 
(original)
+++ lldb/trunk/test/functionalities/inferior-changed/TestInferiorChanged.py Fri 
Mar  7 11:20:50 2014
@@ -21,7 +21,6 @@ class ChangedInferiorTestCase(TestBase):
 self.setTearDownCleanup(dictionary=d)
 self.inferior_not_crashing()
 
-@expectedFailureFreeBSD('llvm.org/pr17933')
 def test_inferior_crashing_dwarf(self):
 Test lldb reloads the inferior after it was changed during the 
session.
 self.buildDwarf()

Modified: lldb/trunk/test/make/Makefile.rules
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/make/Makefile.rules?rev=203253r1=203252r2=203253view=diff
==
--- lldb/trunk/test/make/Makefile.rules (original)
+++ lldb/trunk/test/make/Makefile.rules Fri Mar  7 11:20:50 2014
@@ -363,11 +363,14 @@ endif
 dsym:  $(DSYM)
 all:   $(EXE) $(DSYM)
 clean::
-ifeq $(DYLIB_NAME) 
-   rm -rf $(EXE) $(DSYM) $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME) 
$(ARCHIVE_OBJECTS) *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] 
*.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
-else
-   rm -rf $(EXE) $(DSYM) $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME) 
$(ARCHIVE_OBJECTS) $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_FILENAME) 
$(DYLIB_FILENAME).dSYM $(DYLIB_FILENAME).debug *.d.[0-9] *.d.[0-9][0-9] 
*.d.[0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
+   rm -rf $(EXE) $(OBJECTS) $(PREREQS) $(ARCHIVE_NAME) 
$(ARCHIVE_OBJECTS) *.d.[0-9] *.d.[0-9][0-9] *.d.[0-9][0-9][0-9] 
*.d.[0-9][0-9][0-9][0-9] *.d.[0-9][0-9][0-9][0-9][0-9]
+ifneq $(DYLIB_NAME) 
+   rm -rf $(DYLIB_OBJECTS) $(DYLIB_PREREQS) $(DYLIB_FILENAME) 
$(DYLIB_FILENAME).dSYM $(DYLIB_FILENAME).debug
 endif
+ifneq $(DSYM) 
+   rm -rf $(DSYM)
+endif
+   
 
 #--
 # From http://blog.melski.net/tag/debugging-makefiles/


___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits


Re: [Lldb-commits] [lldb] r203253 - Fix test 'make clean' target for empty $(DSYM) on FreeBSD

2014-03-07 Thread Ed Maste
On 7 March 2014 13:01, Todd Fiala tfi...@google.com wrote:

 Ah I see, ok.

 It might be worth taking a pass at the makefiles at some point and converting 
 the direct rm usage to $(RM), but I wouldn't worry about it now.  Only if it 
 it would have fixed the issue on FreeBSD.

Ah, applying -r only to the cases that actually need to remove
directories would solve it too.  I gave 'rm -f file1  file2' as a
failing example but that does work; it's only w/ -r that an empty
argument caused a failure (now fixed in FreeBSD head).

Anyway, I'm here now so might as well fix up this instance.
___
lldb-commits mailing list
lldb-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits