Index: libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp =================================================================== --- libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp +++ libcxx/test/libcxx/atomics/atomics.align/align.pass.sh.cpp @@ -8,7 +8,7 @@ // // UNSUPPORTED: libcpp-has-no-threads, c++98, c++03 // REQUIRES: libatomic -// FILE_DEPENDENCIES: %t.exe + // RUN: %{build} -latomic // RUN: %{run} // Index: libcxx/test/libcxx/double_include.sh.cpp =================================================================== --- libcxx/test/libcxx/double_include.sh.cpp +++ libcxx/test/libcxx/double_include.sh.cpp @@ -9,7 +9,6 @@ // Test that we can include each header in two TU's and link them together. -// FILE_DEPENDENCIES: %t.exe // RUN: %{cxx} -c %s -o %t.first.o %{flags} %{compile_flags} // RUN: %{cxx} -c %s -o %t.second.o -DWITH_MAIN %{flags} %{compile_flags} // RUN: %{cxx} -o %t.exe %t.first.o %t.second.o %{flags} %{link_flags} Index: libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp =================================================================== --- libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp +++ libcxx/test/libcxx/language.support/support.dynamic/libcpp_deallocate.sh.cpp @@ -35,7 +35,6 @@ // GCC doesn't support the aligned-allocation flags. // XFAIL: gcc -// FILE_DEPENDENCIES: %t.exe // RUN: %{build} -faligned-allocation -fsized-deallocation // RUN: %{run} // RUN: %{build} -faligned-allocation -fno-sized-deallocation -DNO_SIZE Index: libcxx/test/libcxx/selftest/exec.sh.cpp =================================================================== --- libcxx/test/libcxx/selftest/exec.sh.cpp +++ libcxx/test/libcxx/selftest/exec.sh.cpp @@ -7,8 +7,6 @@ // //===----------------------------------------------------------------------===// -// FILE_DEPENDENCIES: %t.exe - // RUN: %{build} // RUN: %{exec} %t.exe "HELLO" Index: libcxx/test/libcxx/selftest/newformat/sh.cpp/remote-substitutions.sh.cpp =================================================================== --- libcxx/test/libcxx/selftest/newformat/sh.cpp/remote-substitutions.sh.cpp +++ libcxx/test/libcxx/selftest/newformat/sh.cpp/remote-substitutions.sh.cpp @@ -15,7 +15,6 @@ // We also check that the path of test-executables is replaced whether they // appear first in the command-line or not. -// FILE_DEPENDENCIES: %t.exe // RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe // RUN: %{exec} %t.exe 0 // RUN: %{exec} ! %t.exe 1 Index: libcxx/test/libcxx/selftest/newformat/sh.cpp/substitutions.sh.cpp =================================================================== --- libcxx/test/libcxx/selftest/newformat/sh.cpp/substitutions.sh.cpp +++ libcxx/test/libcxx/selftest/newformat/sh.cpp/substitutions.sh.cpp @@ -13,7 +13,6 @@ // - %{link_flags} // - %{exec} -// FILE_DEPENDENCIES: %t.exe // RUN: %{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe // RUN: %{exec} %t.exe "HELLO" Index: libcxx/test/libcxx/selftest/test.sh.cpp =================================================================== --- libcxx/test/libcxx/selftest/test.sh.cpp +++ libcxx/test/libcxx/selftest/test.sh.cpp @@ -7,8 +7,6 @@ // //===----------------------------------------------------------------------===// -// FILE_DEPENDENCIES: %t.exe - // RUN: %{build} // RUN: %{run} Index: libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp =================================================================== --- libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp +++ libcxx/test/libcxx/strings/basic.string/PR42676.sh.cpp @@ -8,7 +8,6 @@ // Regression test for PR42676. -// FILE_DEPENDENCIES: %t.exe // RUN: %{cxx} %{flags} %s -o %t.exe %{compile_flags} %{link_flags} -D_LIBCPP_HIDE_FROM_ABI_PER_TU // RUN: %{run} Index: libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp =================================================================== --- libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp +++ libcxx/test/std/containers/associative/map/PR28469_undefined_behavior_segfault.sh.cpp @@ -6,7 +6,6 @@ // //===----------------------------------------------------------------------===// -// FILE_DEPENDENCIES: %t.exe // RUN: %{build} -O2 // RUN: %{run} Index: libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp =================================================================== --- libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp +++ libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp @@ -13,7 +13,6 @@ // class condition_variable_any; -// FILE_DEPENDENCIES: %t.exe // RUN: %{build} // RUN: %{run} 1 // RUN: %{run} 2 Index: libcxx/utils/libcxx/test/config.py =================================================================== --- libcxx/utils/libcxx/test/config.py +++ libcxx/utils/libcxx/test/config.py @@ -1023,7 +1023,7 @@ exec_args.append('--host {}'.format(self.executor.user_prefix + self.executor.host)) executor = os.path.join(self.libcxx_src_root, 'utils', 'ssh.py') else: - exec_args.append('--execdir %t.execdir') + exec_args.append('--execdir %T') executor = os.path.join(self.libcxx_src_root, 'utils', 'run.py') sub.append(('%{exec}', '{} {} {} -- '.format(pipes.quote(sys.executable), pipes.quote(executor), Index: libcxx/utils/libcxx/test/newformat.py =================================================================== --- libcxx/utils/libcxx/test/newformat.py +++ libcxx/utils/libcxx/test/newformat.py @@ -165,7 +165,7 @@ "%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe", "%dbg(EXECUTED AS) %{exec} ! %t.exe" ] - return self._executeShTest(test, litConfig, steps, fileDependencies=['%t.exe']) + return self._executeShTest(test, litConfig, steps) elif filename.endswith('.verify.cpp'): steps = [ "%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} -fsyntax-only " + VERIFY_FLAGS @@ -178,7 +178,7 @@ "%dbg(COMPILED WITH) %{cxx} %s %{flags} %{compile_flags} %{link_flags} -o %t.exe", "%dbg(EXECUTED AS) %{exec} %t.exe" ] - return self._executeShTest(test, litConfig, steps, fileDependencies=['%t.exe']) + return self._executeShTest(test, litConfig, steps) # This is like a .verify.cpp test when clang-verify is supported, # otherwise it's like a .compile.fail.cpp test. This is only provided # for backwards compatibility with the test suite. Index: libcxx/utils/run.py =================================================================== --- libcxx/utils/run.py +++ libcxx/utils/run.py @@ -45,8 +45,6 @@ # Create the execution directory, and make sure we remove it at the end. try: - os.makedirs(args.execdir) - # Ensure the file dependencies exist and copy them to the execution directory. for dep in args.dependencies: if not os.path.exists(dep): @@ -60,7 +58,7 @@ # Run the executable with the given environment in the execution directory. return subprocess.call(' '.join(remaining), cwd=args.execdir, env=env, shell=True) finally: - shutil.rmtree(args.execdir) + pass if __name__ == '__main__': Index: libcxxabi/test/incomplete_type.sh.cpp =================================================================== --- libcxxabi/test/incomplete_type.sh.cpp +++ libcxxabi/test/incomplete_type.sh.cpp @@ -19,7 +19,6 @@ // in the system libc++abi installation on OS X. (DYLD_LIBRARY_PATH is ignored // for shell tests because of Apple security features). -// FILE_DEPENDENCIES: %t.exe // RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.one.o // RUN: %{cxx} %{flags} %{compile_flags} -c %s -o %t.two.o -DTU_ONE // RUN: %{cxx} %{flags} %t.one.o %t.two.o %{link_libcxxabi} %{link_flags} -o %t.exe Index: llvm/utils/lit/lit/TestRunner.py =================================================================== --- llvm/utils/lit/lit/TestRunner.py +++ llvm/utils/lit/lit/TestRunner.py @@ -1059,7 +1059,7 @@ root, not test source root.""" execpath = test.getExecPath() execdir,execbase = os.path.split(execpath) - tmpDir = os.path.join(execdir, 'Output') + tmpDir = os.path.join(execdir, 'Output', execbase + '.dir') tmpBase = os.path.join(tmpDir, execbase) return tmpDir, tmpBase @@ -1496,7 +1496,10 @@ return out,err,exitCode,timeoutInfo,status # Create the output directory if it does not already exist. - lit.util.mkdir_p(os.path.dirname(tmpBase)) + tmpDir = os.path.dirname(tmpBase) + if os.path.isdir(tmpDir): + shutil.rmtree(tmpDir) + lit.util.mkdir_p(tmpDir) # Re-run failed tests up to test.allowed_retries times. execdir = os.path.dirname(test.getExecPath())