Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-10-02 Thread Scott Kruger via petsc-dev




In MR !2138 I have this target as show-fail  which I think is more 
descriptive.


config/report_tests.py -f
is what's done directly.

I made it such that one can copy and paste, but it might be too verbose.

Scott


On 9/20/19 8:53 PM, Jed Brown wrote:

"Smith, Barry F."  writes:


Satish and Barry:  Do we need the Error codes or can I revert to previous 
functionality?


   I think it is important to display the error codes.

   How about displaying at the bottom how to run the broken tests? You already 
show how to run them with the test harness, you could also print how to run 
them directly? Better then mixing it up with the TAP output?


How about a target for it?

make -f gmakefile show-test search=abcd

We already have print-test, which might more accurately be named ls-test.



--
Tech-X Corporation   kru...@txcorp.com
5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
Boulder, CO 80303Fax:   (303) 448-7756


Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Jed Brown via petsc-dev
"Smith, Barry F."  writes:

>> Satish and Barry:  Do we need the Error codes or can I revert to previous 
>> functionality?
>
>   I think it is important to display the error codes.
>
>   How about displaying at the bottom how to run the broken tests? You already 
> show how to run them with the test harness, you could also print how to run 
> them directly? Better then mixing it up with the TAP output?

How about a target for it?

make -f gmakefile show-test search=abcd

We already have print-test, which might more accurately be named ls-test.


Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Smith, Barry F. via petsc-dev



> On Sep 20, 2019, at 4:18 PM, Scott Kruger via petsc-dev 
>  wrote:
> 
> 
> 
> 
> 
> On 9/20/19 2:49 PM, Jed Brown wrote:
>> Hapla  Vaclav via petsc-dev  writes:
>>> On 20 Sep 2019, at 19:59, Scott Kruger 
>>> mailto:kru...@txcorp.com>> wrote:
>>> 
>>> 
>>> On 9/20/19 10:44 AM, Hapla Vaclav via petsc-dev wrote:
>>> I was used to copy the command actually run by test harness, change to 
>>> example's directory and paste the command (just changing one .. to ., e.g. 
>>> ../ex1 to ./ex1).
>>> Is this output gone? Bad news. I think there should definitely be an option 
>>> to quickly reproduce the test run to work on failing tests.
>>> 
>>> I only modified the V=0 option to suppress the TAP 'ok' output.
>>> 
>>> I think you are referring to the 'not ok' now giving the error code instead 
>>> of the cmd which is now true regardless of V.  This was suggested by 
>>> others.  I defer to the larger group on what's desired here.
>>> 
>>> Note that is sometimes tedious to deduce the whole command line from the 
>>> test declarations, for example because of multiple args: lines.
>>> 
>>> Personally, I recommend just cd'ing into the test directory and running the 
>>> scripts by hand.
>>> 
>>> For example:
>>> cd $PETSC_ARCH/tests/ksp/ksp/examples/tests/runex22
>>> cat ksp_ksp_tests-ex22_1.sh
>>> mpiexec  -n 1 ../ex22   > ex22_1.tmp 2> runex22.err
>>> 
>>> OK, this takes a bit more time but does to job.
>> That's yucky.  I think we should have an option to print the command(s)
>> that would be run, one line per expanded {{a b c}}, so we can copy-paste
>> into the terminal with only one step of indirection.
> 
> Ugh.  I'm dealing with bash at this level - not python.
> 
> Satish and Barry:  Do we need the Error codes or can I revert to previous 
> functionality?

  I think it is important to display the error codes.

  How about displaying at the bottom how to run the broken tests? You already 
show how to run them with the test harness, you could also print how to run 
them directly? Better then mixing it up with the TAP output?

   Barry

> 
> Scott
> 
> 
> -- 
> Tech-X Corporation   kru...@txcorp.com
> 5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
> Boulder, CO 80303Fax:   (303) 448-7756



Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Hapla Vaclav via petsc-dev



> On 20 Sep 2019, at 23:18, Scott Kruger  wrote:
> 
> 
> 
> 
> 
> On 9/20/19 2:49 PM, Jed Brown wrote:
>> Hapla  Vaclav via petsc-dev  writes:
>>> On 20 Sep 2019, at 19:59, Scott Kruger 
>>> mailto:kru...@txcorp.com>> wrote:
>>> 
>>> 
>>> On 9/20/19 10:44 AM, Hapla Vaclav via petsc-dev wrote:
>>> I was used to copy the command actually run by test harness, change to 
>>> example's directory and paste the command (just changing one .. to ., e.g. 
>>> ../ex1 to ./ex1).
>>> Is this output gone? Bad news. I think there should definitely be an option 
>>> to quickly reproduce the test run to work on failing tests.
>>> 
>>> I only modified the V=0 option to suppress the TAP 'ok' output.
>>> 
>>> I think you are referring to the 'not ok' now giving the error code instead 
>>> of the cmd which is now true regardless of V.  This was suggested by 
>>> others.  I defer to the larger group on what's desired here.
>>> 
>>> Note that is sometimes tedious to deduce the whole command line from the 
>>> test declarations, for example because of multiple args: lines.
>>> 
>>> Personally, I recommend just cd'ing into the test directory and running the 
>>> scripts by hand.
>>> 
>>> For example:
>>> cd $PETSC_ARCH/tests/ksp/ksp/examples/tests/runex22
>>> cat ksp_ksp_tests-ex22_1.sh
>>> mpiexec  -n 1 ../ex22   > ex22_1.tmp 2> runex22.err
>>> 
>>> OK, this takes a bit more time but does to job.
>> That's yucky.  I think we should have an option to print the command(s)
>> that would be run, one line per expanded {{a b c}}, so we can copy-paste
>> into the terminal with only one step of indirection.
> 
> Ugh.  I'm dealing with bash at this level - not python.
> 
> Satish and Barry:  Do we need the Error codes or can I revert to previous 
> functionality?

What about triggering the previous behavior only conditionally, e.g. by 
something like SHOWCMD=1, at least for now?

Of course, in longer term something like Jed suggests would be very welcome.

Vaclav

> 
> Scott
> 
> 
> -- 
> Tech-X Corporation   kru...@txcorp.com
> 5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
> Boulder, CO 80303Fax:   (303) 448-7756



Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Scott Kruger via petsc-dev






On 9/20/19 2:49 PM, Jed Brown wrote:

Hapla  Vaclav via petsc-dev  writes:


On 20 Sep 2019, at 19:59, Scott Kruger 
mailto:kru...@txcorp.com>> wrote:


On 9/20/19 10:44 AM, Hapla Vaclav via petsc-dev wrote:
I was used to copy the command actually run by test harness, change to 
example's directory and paste the command (just changing one .. to ., e.g. 
../ex1 to ./ex1).
Is this output gone? Bad news. I think there should definitely be an option to 
quickly reproduce the test run to work on failing tests.

I only modified the V=0 option to suppress the TAP 'ok' output.

I think you are referring to the 'not ok' now giving the error code instead of 
the cmd which is now true regardless of V.  This was suggested by others.  I 
defer to the larger group on what's desired here.

Note that is sometimes tedious to deduce the whole command line from the test 
declarations, for example because of multiple args: lines.

Personally, I recommend just cd'ing into the test directory and running the 
scripts by hand.

For example:
cd $PETSC_ARCH/tests/ksp/ksp/examples/tests/runex22
cat ksp_ksp_tests-ex22_1.sh
mpiexec  -n 1 ../ex22   > ex22_1.tmp 2> runex22.err

OK, this takes a bit more time but does to job.


That's yucky.  I think we should have an option to print the command(s)
that would be run, one line per expanded {{a b c}}, so we can copy-paste
into the terminal with only one step of indirection.


Ugh.  I'm dealing with bash at this level - not python.

Satish and Barry:  Do we need the Error codes or can I revert to 
previous functionality?


Scott


--
Tech-X Corporation   kru...@txcorp.com
5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
Boulder, CO 80303Fax:   (303) 448-7756


Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Jed Brown via petsc-dev
Hapla  Vaclav via petsc-dev  writes:

> On 20 Sep 2019, at 19:59, Scott Kruger 
> mailto:kru...@txcorp.com>> wrote:
>
>
> On 9/20/19 10:44 AM, Hapla Vaclav via petsc-dev wrote:
> I was used to copy the command actually run by test harness, change to 
> example's directory and paste the command (just changing one .. to ., e.g. 
> ../ex1 to ./ex1).
> Is this output gone? Bad news. I think there should definitely be an option 
> to quickly reproduce the test run to work on failing tests.
>
> I only modified the V=0 option to suppress the TAP 'ok' output.
>
> I think you are referring to the 'not ok' now giving the error code instead 
> of the cmd which is now true regardless of V.  This was suggested by others.  
> I defer to the larger group on what's desired here.
>
> Note that is sometimes tedious to deduce the whole command line from the test 
> declarations, for example because of multiple args: lines.
>
> Personally, I recommend just cd'ing into the test directory and running the 
> scripts by hand.
>
> For example:
> cd $PETSC_ARCH/tests/ksp/ksp/examples/tests/runex22
> cat ksp_ksp_tests-ex22_1.sh
> mpiexec  -n 1 ../ex22   > ex22_1.tmp 2> runex22.err
>
> OK, this takes a bit more time but does to job.

That's yucky.  I think we should have an option to print the command(s)
that would be run, one line per expanded {{a b c}}, so we can copy-paste
into the terminal with only one step of indirection.


Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Hapla Vaclav via petsc-dev

On 20 Sep 2019, at 19:59, Scott Kruger 
mailto:kru...@txcorp.com>> wrote:


On 9/20/19 10:44 AM, Hapla Vaclav via petsc-dev wrote:
I was used to copy the command actually run by test harness, change to 
example's directory and paste the command (just changing one .. to ., e.g. 
../ex1 to ./ex1).
Is this output gone? Bad news. I think there should definitely be an option to 
quickly reproduce the test run to work on failing tests.

I only modified the V=0 option to suppress the TAP 'ok' output.

I think you are referring to the 'not ok' now giving the error code instead of 
the cmd which is now true regardless of V.  This was suggested by others.  I 
defer to the larger group on what's desired here.

Note that is sometimes tedious to deduce the whole command line from the test 
declarations, for example because of multiple args: lines.

Personally, I recommend just cd'ing into the test directory and running the 
scripts by hand.

For example:
cd $PETSC_ARCH/tests/ksp/ksp/examples/tests/runex22
cat ksp_ksp_tests-ex22_1.sh
mpiexec  -n 1 ../ex22   > ex22_1.tmp 2> runex22.err

OK, this takes a bit more time but does to job.


or

cd $PETSC_ARCH/tests/ksp/ksp/examples/tests
./runex22.sh
ok ksp_ksp_tests-ex22_1
ok diff-ksp_ksp_tests-ex22_1

A problem with this is that if the test includes many {{ }}, it runs all 
combinations and one can't focus on just one failing. E.g.
  make -f gmakefile.test test 
search='dm_impls_plex_tests-ex18_7_hdf5_repart_nsize-5interpolate-serial'
does not run anything and one needs to enter e.g.
  make -f gmakefile.test test search='dm_impls_plex_tests-ex18_7_hdf5_repart%'
which can run tons of tests and one has to wait and then CTRL+C.

BTW I think there should an underscore after nsize:
dm_impls_plex_tests-ex18_7_hdf5_repart_nsize-5_interpolate-serial


Thanks,
Vaclav




Scott



--
Tech-X Corporation   kru...@txcorp.com
5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
Boulder, CO 80303Fax:   (303) 448-7756



Re: [petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Scott Kruger via petsc-dev






On 9/20/19 10:44 AM, Hapla Vaclav via petsc-dev wrote:

I was used to copy the command actually run by test harness, change to 
example's directory and paste the command (just changing one .. to ., e.g. 
../ex1 to ./ex1).

Is this output gone? Bad news. I think there should definitely be an option to 
quickly reproduce the test run to work on failing tests.


I only modified the V=0 option to suppress the TAP 'ok' output.

I think you are referring to the 'not ok' now giving the error code 
instead of the cmd which is now true regardless of V.  This was 
suggested by others.  I defer to the larger group on what's desired here.




Note that is sometimes tedious to deduce the whole command line from the test 
declarations, for example because of multiple args: lines.


Personally, I recommend just cd'ing into the test directory and running 
the scripts by hand.


For example:
cd $PETSC_ARCH/tests/ksp/ksp/examples/tests/runex22
cat ksp_ksp_tests-ex22_1.sh
mpiexec  -n 1 ../ex22   > ex22_1.tmp 2> runex22.err

or

cd $PETSC_ARCH/tests/ksp/ksp/examples/tests
./runex22.sh
 ok ksp_ksp_tests-ex22_1
 ok diff-ksp_ksp_tests-ex22_1



Scott



--
Tech-X Corporation   kru...@txcorp.com
5621 Arapahoe Ave, Suite A   Phone: (720) 974-1841
Boulder, CO 80303Fax:   (303) 448-7756


[petsc-dev] test harness: output of actually executed command for V=1 gone?

2019-09-20 Thread Hapla Vaclav via petsc-dev
I was used to copy the command actually run by test harness, change to 
example's directory and paste the command (just changing one .. to ., e.g. 
../ex1 to ./ex1).

Is this output gone? Bad news. I think there should definitely be an option to 
quickly reproduce the test run to work on failing tests.

Note that is sometimes tedious to deduce the whole command line from the test 
declarations, for example because of multiple args: lines.

Vaclav