Example #1
0
def setup(app):
    # Generate one page for each setup:
    if get('setups', ['setups-data.tar.gz'], '_static'):
        print('Extracting setup data ...')
        os.system('tar -C _static -xzf _static/setups-data.tar.gz')
        print('Generating setup pages ...')
        os.system('cd setups; %s make_setup_pages.py' % executable)


    # Get png files and other stuff from the AGTS scripts that run
    # every weekend:
    from gpaw.test.big.agts import AGTSQueue
    queue = AGTSQueue()
    queue.collect()
    names = set()
    for job in queue.jobs:
        if not job.creates:
            continue
        for name in job.creates:
            assert name not in names, "Name '%s' clashes!" % name
            names.add(name)
            # the files are saved by the weekly tests under agtspath/agts-files
            # now we are copying them back to their original run directories
            path = os.path.join(job.dir, name)
            if os.path.isfile(path):
                continue
            print((path, 'copied from', agtspath))
            get('agts-files', [name], job.dir, source=agtspath)

    # Get files that we can't generate:
    for dir, file in [('.', 'camd.png'),
                      ('tutorials/xas', 'xas_illustration.png'),
                      ('tutorials/xas', 'xas_h2o_convergence.png'),
                      ('install/BGP', 'bgp_mapping_intranode.png'),
                      ('install/BGP', 'bgp_mapping1.png'),
                      ('install/BGP', 'bgp_mapping2.png'),
                      ('devel', 'bigpicture.png'),
                      ('_build', 'bigpicture.svg')]:
        get('gpaw-stuff', [file], dir, jjwww)
Example #2
0
def setup(app):
    # Get png files and other stuff from the AGTS scripts that run
    # every weekend:
    from gpaw.test.big.agts import AGTSQueue
    queue = AGTSQueue()
    queue.collect()
    names = set()
    for job in queue.jobs:
        if not job.creates:
            continue
        for name in job.creates:
            if name in names:
                raise RuntimeError(
                    'The name {0!r} is used in more than one place!'
                    .format(name))
            names.add(name)
            # the files are saved by the weekly tests under agtspath/agts-files
            # now we are copying them back to their original run directories
            path = os.path.join(job.dir, name)
            if os.path.isfile(path):
                continue
            print(path, 'copied from', agtspath)
            get('agts-files', [name], job.dir, source=agtspath)
cmd("""wget --no-check-certificate --quiet \
http://wiki.fysik.dtu.dk/gpaw-files/gpaw-setups-latest.tar.gz && \
tar xzf gpaw-setups-latest.tar.gz && \
rm gpaw-setups-latest.tar.gz && \
mv gpaw-setups-[0-9]* gpaw/gpaw-setups""")

cmd('svn export https://svn.fysik.dtu.dk/projects/ase/trunk ase')

# ase needed
sys.path.insert(0, '%s/ase' % dir)

from gpaw.test.big.agts import AGTSQueue
from gpaw.test.big.niflheim import NiflheimCluster

queue = AGTSQueue()
queue.collect()
cluster = NiflheimCluster(asepath=os.path.join(dir, 'ase'),
                          setuppath=os.path.join(gpawdir, 'gpaw-setups'))
# Example below is confusing: job.script must NOT be the *.agts.py script,
# but the actual python script to be run!
# testsuite.agts.py does both: see gpaw/test/big/miscellaneous/testsuite.agts.py
#queue.jobs = [job for job in queue.jobs if job.script == 'testsuite.agts.py']

nfailed = queue.run(cluster)

gfiles = os.path.join(dir, 'gpaw-files')
if not os.path.isdir(gfiles):
    os.mkdir(gfiles)

queue.copy_created_files(gfiles)
Example #4
0
def setup(app):
    # Generate one page for each setup:
    if get('setups', ['setups-data.tar.gz'], '_static'):
        print 'Extracting setup data ...'
        os.system('tar -C _static -xzf _static/setups-data.tar.gz')
        print 'Generating setup pages ...'
        os.system('cd setups; %s make_setup_pages.py' % executable)

    # Retrieve latest code coverage pages:
    if get('.', ['gpaw-coverage-latest.tar.gz'], '_static',
           source='http://dcwww.camp.dtu.dk/~chlg'):
        print 'Extracting coverage pages ...'
        os.system('tar -C devel -xzf _static/gpaw-coverage-latest.tar.gz')

    # Fallback in case coverage pages were not found
    if not os.path.isfile('devel/testsuite.rst'):
        open('devel/testsuite.rst', 'w').write( \
            '\n'.join(['.. _testsuite:',
                       '', '==========', 'Test suite', '==========',
                       '', '.. warning::', '   Coverage files not found!']))
    if not os.path.isdir('devel/coverage'):
        os.mkdir('devel/coverage', 0755)
    if not os.path.isfile('devel/coverage/index.rst'):
        open('devel/coverage/index.rst', 'w').write( \
            '\n'.join(['-----------------------------------',
                       'List of files with missing coverage',
                       '-----------------------------------',
                       '', 'Back to :ref:`code coverage <coverage>`.',
                       '', '.. warning::', '   Coverage files not found!']))
    if not os.path.isfile('devel/coverage/ranking.txt'):
        open('devel/coverage/ranking.txt', 'w').write( \
            '\n'.join(['-------------------------------------',
                       'Distribution of coverage by developer',
                       '-------------------------------------',
                       '', '.. warning::', '   Coverage files not found!']))
    if not os.path.isfile('devel/coverage/summary.txt'):
        open('devel/coverage/summary.txt', 'w').write( \
            '\n'.join(['-------', 'Summary', '-------',
                       '', '.. warning::', '   Coverage files not found!']))

    # Get png files and other stuff from the AGTS scripts that run
    # every weekend:
    from gpaw.test.big.agts import AGTSQueue
    queue = AGTSQueue()
    queue.collect()
    names = set()
    for job in queue.jobs:
        if job.creates:
            for name in job.creates:
                assert name not in names, "Name '%s' clashes!" % name
                names.add(name)
                get('gpaw-files', [name], job.dir, source=jjwww)

    # Get files that we can't generate:
    for dir, file in [
        ('.', 'camd.png'),
        ('tutorials/xas', 'xas_illustration.png'),
        ('tutorials/xas', 'xas_h2o_convergence.png'),
        ('install/BGP', 'bgp_mapping_intranode.png'),  
        ('install/BGP', 'bgp_mapping1.png'),
        ('install/BGP', 'bgp_mapping2.png')]:
        get('gpaw-stuff', [file], dir, jjwww)
Example #5
0
def setup(app):
    # Generate one page for each setup:
    if get('setups', ['setups-data.tar.gz'], '_static'):
        print 'Extracting setup data ...'
        os.system('tar -C _static -xzf _static/setups-data.tar.gz')
        print 'Generating setup pages ...'
        os.system('cd setups; %s make_setup_pages.py' % executable)

    # Retrieve latest code coverage pages:
    if get('.', ['gpaw-coverage-latest.tar.gz'],
           '_static',
           source='http://dcwww.camp.dtu.dk/~chlg'):
        print 'Extracting coverage pages ...'
        os.system('tar -C devel -xzf _static/gpaw-coverage-latest.tar.gz')

    # Fallback in case coverage pages were not found
    if not os.path.isfile('devel/testsuite.rst'):
        open('devel/testsuite.rst', 'w').write( \
            '\n'.join(['.. _testsuite:',
                       '', '==========', 'Test suite', '==========',
                       '', '.. warning::', '   Coverage files not found!']))
    if not os.path.isdir('devel/coverage'):
        os.mkdir('devel/coverage', 0755)
    if not os.path.isfile('devel/coverage/index.rst'):
        open('devel/coverage/index.rst', 'w').write( \
            '\n'.join(['-----------------------------------',
                       'List of files with missing coverage',
                       '-----------------------------------',
                       '', 'Back to :ref:`code coverage <coverage>`.',
                       '', '.. warning::', '   Coverage files not found!']))
    if not os.path.isfile('devel/coverage/ranking.txt'):
        open('devel/coverage/ranking.txt', 'w').write( \
            '\n'.join(['-------------------------------------',
                       'Distribution of coverage by developer',
                       '-------------------------------------',
                       '', '.. warning::', '   Coverage files not found!']))
    if not os.path.isfile('devel/coverage/summary.txt'):
        open('devel/coverage/summary.txt', 'w').write( \
            '\n'.join(['-------', 'Summary', '-------',
                       '', '.. warning::', '   Coverage files not found!']))

    # Get png files and other stuff from the AGTS scripts that run
    # every weekend:
    from gpaw.test.big.agts import AGTSQueue
    queue = AGTSQueue()
    queue.collect()
    names = set()
    for job in queue.jobs:
        if job.creates:
            for name in job.creates:
                assert name not in names, "Name '%s' clashes!" % name
                names.add(name)
                get('gpaw-files', [name], job.dir, source=jjwww)

    # Get files that we can't generate:
    for dir, file in [('.', 'camd.png'),
                      ('tutorials/xas', 'xas_illustration.png'),
                      ('tutorials/xas', 'xas_h2o_convergence.png'),
                      ('install/BGP', 'bgp_mapping_intranode.png'),
                      ('install/BGP', 'bgp_mapping1.png'),
                      ('install/BGP', 'bgp_mapping2.png')]:
        get('gpaw-stuff', [file], dir, jjwww)
Example #6
0
"""This script will print a list of files generated by the  AGTS scripts
that run every weekend.

Just do::
    
    $ python check_images
"""

import os

from gpaw.test.big.agts import AGTSQueue

queue = AGTSQueue()
queue.collect()

for job in queue.jobs:
    if not job.creates:
        continue
    for name in job.creates:
        path = os.path.join(job.dir, name)
        print(path)
Example #7
0
        id = p.stdout.readline().split('.')[0]
        job.pbsid = id
        os.chdir(dir)


if __name__ == '__main__':
    from gpaw.test.big.agts import AGTSQueue

    os.chdir(os.path.join(os.environ['HOME'], 'weekend-tests'))

    niflheim = Niflheim()
    if 1:
        niflheim.install()

    os.chdir('gpaw')
    queue = AGTSQueue()
    queue.collect()

    # examples of selecting jobs
    #
    # **Note** that this script searches the directories
    # created during the niflheim.install() step above!
    #
    #queue.jobs = [j for j in queue.jobs if j.script == 'testsuite.agts.py']
    #queue.jobs = [j for j in queue.jobs if j.script == 'neb.agts.py']
    #queue.jobs = [j for j in queue.jobs if j.dir.startswith('doc')]
    #queue.jobs = [j for j in queue.jobs
    #              if j.dir.startswith('gpaw/test/big/bader_water')]
    #queue.jobs = [j for j in queue.jobs
    #              if j.dir.startswith('doc/devel/memory_bandwidth')]
Example #8
0
        id = p.stdout.readline().split('.')[0]
        job.pbsid = id
        os.chdir(dir)


if __name__ == '__main__':
    from gpaw.test.big.agts import AGTSQueue

    os.chdir(os.path.join(os.environ['HOME'], 'weekend-tests'))

    niflheim = Niflheim()
    if 1:
        niflheim.install()

    os.chdir('gpaw')
    queue = AGTSQueue()
    queue.collect()

    # examples of selecting jobs
    #
    # **Note** that this script searches the directories
    # created during the niflheim.install() step above!
    #
    #queue.jobs = [j for j in queue.jobs if j.script == 'testsuite.agts.py']
    #queue.jobs = [j for j in queue.jobs if j.script == 'neb.agts.py']
    #queue.jobs = [j for j in queue.jobs if j.dir.startswith('doc')]
    #queue.jobs = [j for j in queue.jobs
    #              if j.dir.startswith('gpaw/test/big/bader_water')]
    #queue.jobs = [j for j in queue.jobs
    #              if j.dir.startswith('doc/devel/memory_bandwidth')]
Example #9
0
cmd("""wget --no-check-certificate --quiet \
http://wiki.fysik.dtu.dk/gpaw-files/gpaw-setups-latest.tar.gz && \
tar xzf gpaw-setups-latest.tar.gz && \
rm gpaw-setups-latest.tar.gz && \
mv gpaw-setups-[0-9]* gpaw/gpaw-setups""")

cmd('svn export https://svn.fysik.dtu.dk/projects/ase/trunk ase')

# ase needed
sys.path.insert(0, '%s/ase' % dir)

from gpaw.test.big.agts import AGTSQueue
from gpaw.test.big.niflheim import NiflheimCluster

queue = AGTSQueue()
queue.collect()
cluster = NiflheimCluster(asepath=os.path.join(dir, 'ase'),
                          setuppath=os.path.join(gpawdir, 'gpaw-setups'))
# Example below is confusing: job.script must NOT be the *.agts.py script,
# but the actual python script to be run!
# testsuite.agts.py does both: see gpaw/test/big/miscellaneous/testsuite.agts.py
#queue.jobs = [job for job in queue.jobs if job.script == 'testsuite.agts.py']

nfailed = queue.run(cluster)

gfiles = os.path.join(dir, 'gpaw-files')
if not os.path.isdir(gfiles):
    os.mkdir(gfiles)

queue.copy_created_files(gfiles)