Ticket #12805: trac_12805-no-tmp.patch

File trac_12805-no-tmp.patch, 1.1 KB (added by jhpalmieri, 10 years ago)

scripts repo

  • sage-test

    # HG changeset patch
    # User J. H. Palmieri <palmieri@math.washington.edu>
    # Date 1333486085 25200
    # Node ID b5286c566dbd930ed511f7f71718088366c6269b
    # Parent  7d84a793c1e5aca967f3c22a19ea5c10a9968367
    Do not create the directory SAGE_TESTDIR/tmp/
    because all doctesting actually takes place in
    SAGE_TESTDIR: the subdirectory tmp is not used.
    
    diff --git a/sage-test b/sage-test
    a b except KeyError: 
    3232# tempfile.gettempdir()?
    3333if 'SAGE_TESTDIR' not in os.environ:
    3434    os.environ['SAGE_TESTDIR'] = os.path.join(SAGE_ROOT, "tmp")
    35 TMP = os.path.join(os.environ['SAGE_TESTDIR'], "tmp")
     35SAGE_TESTDIR = os.environ['SAGE_TESTDIR']
    3636try:
    37     os.makedirs(TMP)
     37    os.makedirs(SAGE_TESTDIR)
    3838except OSError:
    39     if not os.path.isdir(TMP):
     39    if not os.path.isdir(SAGE_TESTDIR):
    4040        raise
    4141
    4242def sage_test_command(f):
    def test(F, cmd): 
    8888        failed.append(sage_test_command(F))
    8989    elif err != 0:
    9090        failed.append(sage_test_command(F))
    91     os.system("mv -f __test* %s 2>/dev/null"%(TMP))
    9291    t = time.time() - t
    9392    print "\t [%.1f s]" % t
    9493    if XML_RESULTS: