sfepy/sfepy — Issue #17: make ./runTests.py --filter-more the default?
Author: rc
Created: 2012-01-30 10:23:59+00:00
State: open

I suggest this behavior:

$ ./runTests.py
<<< directory: tests, test files: 14
+++ test_structAdd: ok
+++ test_structIAdd: ok
+++ test_linear_terms: ok
+++ test_input: ok
+++ test_input: ok
+++ test_input: ok
+++ test_input: ok
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
+++ test_linearRigidBodyBC: ok
+++ test_linearRigidBodyBC: ok
+++ test_readMeshes: ok
+++ test_compareSameMeshes: ok
+++ test_parseEquations: ok
+++ test_parseRegions: ok
+++ test_pbc: ok
+++ test_pbc: ok
+++ test_problemCreation: ok
14 test file(s) executed in 13.56 s, 0 failure(s) of 18 test(s)

Currently the above command prints a lot of info.

I think when executing tests, it's important you run one simple command,
that doesn't print a lot of garbage, so that I can easily see - all is
ok/something went wrong (-> investigate).

Migrated from http://code.google.com/p/sfepy/issues/detail?id=13

earlier comments

robert.cimrman said, at 2008-02-05T14:07:30.000Z:

This might be better, as the test file names are visible:

{{{
$ ./runTests.py --filter-more
<<< directory: tests, test files: 14
<<< tests/test_input_kostka.py
+++ test_input: ok
<<< tests/test_input_navier_stokes.py
+++ test_input: ok
<<< tests/test_input_poisson.py
+++ test_input: ok
<<< tests/test_elasticity_small_strain.py
+++ test_linear_terms: ok
<<< tests/test_quadratures.py
+++ test_problemCreation: ok
<<< tests/test_io.py
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
<<< tests/test_parsing.py
+++ test_parseEquations: ok
+++ test_parseRegions: ok
<<< tests/test_periodic_bc_3d.py
+++ test_pbc: ok
<<< tests/test_lcbc_2d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_periodic_bc_2d.py
+++ test_pbc: ok
<<< tests/test_input_le.py
+++ test_input: ok
<<< tests/test_base.py
+++ test_structAdd: ok
+++ test_structIAdd: ok
<<< tests/test_lcbc_3d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_meshio.py
+++ test_readMeshes: ok
+++ test_compareSameMeshes: ok
14 test file(s) executed in 22.92 s, 0 failure(s) of 18 test(s)
}}}

Do you agree?

robert.cimrman said, at 2008-02-05T14:34:59.000Z:

I have commited the change (options are now --filter-none, --filter-less,
--filter-more). This is imho both informative and terse enough...

ondrej.certik said, at 2008-02-05T15:16:18.000Z:

Excellent! The default behavior is now:

$ ./runTests.py
<<< directory: tests, test files: 14
<<< tests/test_base.py
+++ test_structAdd: ok
+++ test_structIAdd: ok
<<< tests/test_elasticity_small_strain.py
+++ test_linear_terms: ok
<<< tests/test_input_kostka.py
+++ test_input: ok
<<< tests/test_input_le.py
+++ test_input: ok
<<< tests/test_input_navier_stokes.py
+++ test_input: ok
<<< tests/test_input_poisson.py
+++ test_input: ok
<<< tests/test_io.py
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
<<< tests/test_lcbc_2d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_lcbc_3d.py
+++ test_linearRigidBodyBC: ok
<<< tests/test_meshio.py
+++ test_readMeshes: ok
+++ test_compareSameMeshes: ok
<<< tests/test_parsing.py
+++ test_parseEquations: ok
+++ test_parseRegions: ok
<<< tests/test_periodic_bc_2d.py
+++ test_pbc: ok
<<< tests/test_periodic_bc_3d.py
+++ test_pbc: ok
<<< tests/test_quadratures.py
+++ test_problemCreation: ok
14 test file(s) executed in 13.55 s, 0 failure(s) of 18 test(s)

Test file names should be visible, but the <<< and +++ syntax is kind of messy.

How about the following syntax:

+++ tests/test_base.py: test_structAdd: ok
+++ tests/test_base.py: test_structIAdd: ok
+++ tests/test_lcbc_3d.py: test_linearRigidBodyBC: ok
+++ tests/test_meshio.py: test_readMeshes: ok
+++ tests/test_meshio.py: ttest_compareSameMeshes: ok

or this syntax:

tests/test_base.py:
+++ test_structAdd: ok
+++ test_structIAdd: ok
tests/test_lcbc_3d.py:
+++ test_linearRigidBodyBC: ok
tests/test_meshio.py:
+++ test_readMeshes: ok
+++ ttest_compareSameMeshes: ok

ondrej.certik said, at 2008-02-05T15:23:23.000Z:

When this is resolved, let's update the examples wiki page with the final syntax,
only then close this issue.

robert.cimrman said, at 2008-02-05T15:33:08.000Z:

It could be done. But how would you format the other output options then? The current
implementation is very simple...

robert.cimrman said, at 2008-02-05T15:41:18.000Z:

or this?

<<< directory: tests, test files: 14
<<< tests/test_input_kostka.py
+++ test_input: ok
<<< tests/test_input_navier_stokes.py
+++ test_input: ok
<<< tests/test_input_poisson.py
+++ test_input: ok

with --filter-less:

<<< directory: tests, test files: 14
<<< tests/test_input_kostka.py
>>> test instance prepared (1 test(s))
... solving input/kostka.py...
... input/kostka.py solved
+++ test_input: ok
>>> all passed in 0.92 s

and with --filter-more:

<<< directory: tests, test files: 14
+++ test_input: ok
--- test_input: failed!
--- test_input: failed!
--- test_linear_terms: failed!
+++ test_problemCreation: ok
+++ test_recursiveDictHDF5: ok

ondrej.certik said, at 2008-02-05T15:48:30.000Z:

I like your first example in the comment 6 but with a substitution " " for "<<<".

I just want to quickly glance at the results and see if all is ok. All rubish, like
"<<<" makes this more difficult imho.

robert.cimrman said, at 2008-02-05T16:20:46.000Z:

try the new version - it looks ok with all the options. if you agree, could you
update the example and close the issue?

ondrej.certik said, at 2008-02-05T16:28:35.000Z:

Perfect, thanks for the fix:

$ ./runTests.py
<<< directory: tests, test files: 14
tests/test_base.py
+++ test_structAdd: ok
+++ test_structIAdd: ok
tests/test_elasticity_small_strain.py
+++ test_linear_terms: ok
tests/test_input_kostka.py
+++ test_input: ok
tests/test_input_le.py
+++ test_input: ok
tests/test_input_navier_stokes.py
+++ test_input: ok
tests/test_input_poisson.py
+++ test_input: ok
tests/test_io.py
+++ test_recursiveDictHDF5: ok
+++ test_sparseMatrixHDF5: ok
tests/test_lcbc_2d.py
+++ test_linearRigidBodyBC: ok
tests/test_lcbc_3d.py
+++ test_linearRigidBodyBC: ok
tests/test_meshio.py
+++ test_readMeshes: ok
+++ test_compareSameMeshes: ok
tests/test_parsing.py
+++ test_parseEquations: ok
+++ test_parseRegions: ok
tests/test_periodic_bc_2d.py
+++ test_pbc: ok
tests/test_periodic_bc_3d.py
+++ test_pbc: ok
tests/test_quadratures.py
+++ test_problemCreation: ok
14 test file(s) executed in 13.57 s, 0 failure(s) of 18 test(s)

Wiki fixed.