Author: Michael Buch Date: 2022-12-08T17:17:05Z New Revision: ad3870d6552305d2d6bd6aa2faca6f0644052d9a
URL: https://github.com/llvm/llvm-project/commit/ad3870d6552305d2d6bd6aa2faca6f0644052d9a DIFF: https://github.com/llvm/llvm-project/commit/ad3870d6552305d2d6bd6aa2faca6f0644052d9a.diff LOG: [lldb][Test] TestRerunAndExpr.py: explicitly delete a.out before rebuilding it **Summary** Older versions of `make` would occasionally fail to realize that a pre-requisite for the `a.out` target has changed. This resulted in roughly 1 out of 10 test runs to fail. Instead of relying on `make` to resolve this dependency simply remove the file before rebuilding; this will give make no option but to remake `a.out`. **Testing** * Confirmed that the test passes on the host for 100 runs where without the patch it would fail after ~10 **Details** Adding `-d` to lldbtest's `make` invocation and running the test without this patch sometimes yielded: ``` Removing child 0x600000308ff0 PID 19915 from chain. Successfully remade target file `rebuild.o'. Finished prerequisites of target file `a.out'. Prerequisite `rebuild.o' is newer than target `a.out'. No need to remake target `a.out'. ``` Differential Revision: https://reviews.llvm.org/D139643 Added: Modified: lldb/test/API/functionalities/rerun_and_expr/TestRerunAndExpr.py Removed: ################################################################################ diff --git a/lldb/test/API/functionalities/rerun_and_expr/TestRerunAndExpr.py b/lldb/test/API/functionalities/rerun_and_expr/TestRerunAndExpr.py index 192e13151a954..09ccf1f1a5b4c 100644 --- a/lldb/test/API/functionalities/rerun_and_expr/TestRerunAndExpr.py +++ b/lldb/test/API/functionalities/rerun_and_expr/TestRerunAndExpr.py @@ -41,6 +41,8 @@ def test(self): ValueCheck(name='m_val', value='42') ]) + # Delete the executable to force make to rebuild it. + remove_file(exe) self.build(dictionary={'CXX_SOURCES':'rebuild.cpp', 'EXE':'a.out'}) # Rerun program within the same target _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits