Giter VIP home page Giter VIP logo

testcode's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

testcode's Issues

Allow config variables to be used inside config variables

We've a situation where we'd like to customise launch_parallel, and pass an extra argument to it in some cases.

The default is
launch_parallel = 'mpirun -np tc.nprocs'

but for various configs we'd like to have e.g.
launch_parallel='mpirun -np tc.nprocs --my-other-option'
or
launch_parallel='mpirun -np tc.nprocs --my-special-option'

Would it be possible to have a variable like
launch_parallel_template='mpirun -np tc.nprocs'
(which is a thing we might customise depending on the MPI implementation)

and then in the individual configs
launch_parallel='tc.launch_parallel_template --my-other-option'
or
launch_parallel='tc.launch_parallel_template --my-special-option'

Please flush stdout after each test run

I have the weird problem that the Quantum ESPRESSO testsuite (which uses testcode2 with --verbose) does not print out anything until the main testcode2.py program has finished, at which point the whole output is flushed.

This only happens when building Debian packages with sbuild, as is done on their (and Ubuntu's I believe) autobuilder network.

A solution is to add sys.stdout.flush() at the end of the for-loop in __init__.py:295:

--- ./test-suite/testcode/lib/testcode2/__init__.py.orig        2016-09-23 18:59:05.099035651 +0200
+++ ./test-suite/testcode/lib/testcode2/__init__.py     2016-09-23 18:59:49.855034136 +0200
@@ -302,6 +302,7 @@
                         raise exceptions.RunError(err[0])
                     else:
                         self.verify_job(test_input, test_arg, verbose, rundir)
+                sys.stdout.flush()
         except exceptions.RunError:
             err = sys.exc_info()[1]
             if verbose > 2:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.