Description: Avoid a spurious failure when TMPDIR is inside the source
 Check that a directory created my mktemp is actually outside our source tree,
 as it expects.
Author: Stefano Rivera <stefanor@debian.org>
Forwarded: no
Last-Updated: 2013-08-28

--- a/pypy/interpreter/test/test_app_main.py
+++ b/pypy/interpreter/test/test_app_main.py
@@ -940,6 +940,8 @@
 
         sys.path.append(self.goal_dir)
         # make sure cwd does not contain a stdlib
+        if self.tmp_dir.startswith(self.trunkdir):
+            skip('TMPDIR is inside the PyPy source')
         os.chdir(self.tmp_dir)
         tmp_pypy_c = os.path.join(self.tmp_dir, 'pypy-c')
         try:
