[vim/vim] Tinytests (#6993)

28 views
Skip to first unread message

Michael Soyka

unread,
Sep 20, 2020, 9:13:17 PM9/20/20
to vim/vim, Subscribed

The primary purpose of these proposed changes is to ensure that the "tinytests" target in testdir/Make_ming.mak can be run correctly regardless of the 'fileformat' property of the .in and .ok files in the workspace. If the fileformat of the test.out file is not the same as the fileformat of the .ok file, diff will report differences and the test will fail. This becomes possible if git-checkout changes line endings.

The first commit prevents test22 from failing if does not have CRLF line endings. With this change, the fileformat change made to .in files in Make_ming.mak is no longer necessary and can be removed.

The remaining commits change Make_ming.mak so that:

  1. the fileformat of .in files is not changed,
  2. the fileformat for test.out and .ok files are forced to be the same,
  3. the scratch directory "dostmp" becomes unnecessary and can be eliminated, and
  4. direct references to DOS utilities are changed to use the defined Make variables.

With syntax changes, I think these changes to Make_ming.mak are appropriate for Make_dos.mak as well.


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/6993

Commit Summary

  • Allow test to complete as designed if file becomes modified
  • Make_ming.mak: force .out and .ok to have same fileformats
  • Make_ming.mak: remove "dos" conversion in "tinytests"
  • Make_ming.mak: eliminate copy of "tinytests" .in files
  • Make_ming.mak: remove "dostmp" scratch directory
  • Make_ming.mak: remove unnecesary copy
  • Make_ming.mak: move statement closer to where it is used
  • Make_ming.mak: make full use of existing make variables

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.

codecov[bot]

unread,
Sep 20, 2020, 9:38:25 PM9/20/20
to vim/vim, Subscribed

Codecov Report

Merging #6993 into master will decrease coverage by 0.59%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@

##           master    #6993      +/-   ##

==========================================

- Coverage   88.58%   87.99%   -0.60%     

==========================================

  Files         148      147       -1     

  Lines      161528   160681     -847     

==========================================

- Hits       143096   141396    -1700     

- Misses      18432    19285     +853     
Impacted Files Coverage Δ
src/libvterm/src/rect.h 0.00% <0.00%> (-96.56%) ⬇️
src/libvterm/src/state.c 49.49% <0.00%> (-40.50%) ⬇️
src/libvterm/include/vterm.h 0.00% <0.00%> (-37.50%) ⬇️
src/libvterm/src/pen.c 50.73% <0.00%> (-33.93%) ⬇️
src/libvterm/src/keyboard.c 55.78% <0.00%> (-32.64%) ⬇️
src/libvterm/src/encoding.c 44.55% <0.00%> (-27.73%) ⬇️
src/libvterm/src/vterm.c 48.13% <0.00%> (-18.54%) ⬇️
src/libvterm/src/parser.c 84.31% <0.00%> (-10.79%) ⬇️
src/libvterm/src/mouse.c 41.66% <0.00%> (-6.67%) ⬇️
src/screen.c 83.99% <0.00%> (-2.53%) ⬇️
... and 30 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 10e4f12...2252ca9. Read the comment docs.

Bram Moolenaar

unread,
Sep 21, 2020, 3:25:43 PM9/21/20
to vim/vim, Subscribed

Looking at the github actions, which have three Mingw targets, they all still appear to use dostmp:
..\gvim -u dos.vim -U NONE --noplugin --not-a-term "+set ff=unix|f test.out|wq" dostmp\test26.out
Is this using src/testdir/Make_dos.mak?

vim-dev ML

unread,
Sep 21, 2020, 4:12:28 PM9/21/20
to vim/vim, vim-dev ML, Your activity

On 09/21/2020 3:25 PM, Bram Moolenaar (Vim Github Repository) wrote:
>
> Looking at the github actions, which have three Mingw targets, they
> all still appear to use dostmp:
> ..\gvim -u dos.vim -U NONE --noplugin --not-a-term "+set ff=unix|f
> test.out|wq" dostmp\test26.out
> Is this using src/testdir/Make_dos.mak?
>
yes

>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/vim/vim/pull/6993#issuecomment-696321586>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACY5DGCZMFGVEWBRHTTDDLDSG6SC5ANCNFSM4RT636YA>.
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google
> Groups "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to vim_dev+u...@googlegroups.com
> <mailto:vim_dev+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/6993/c696321586%40github.com
> <https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/6993/c696321586%40github.com?utm_medium=email&utm_source=footer>.

vim-dev ML

unread,
Sep 21, 2020, 4:15:33 PM9/21/20
to vim/vim, vim-dev ML, Your activity

On 09/21/2020 3:25 PM, Bram Moolenaar (Vim Github Repository) wrote:
>
> Looking at the github actions, which have three Mingw targets, they
> all still appear to use dostmp:
> ..\gvim -u dos.vim -U NONE --noplugin --not-a-term "+set ff=unix|f
> test.out|wq" dostmp\test26.out
> Is this using src/testdir/Make_dos.mak?
>
Yes it is.  I noticed that as well but I have no idea how to change it.

>
> —
> You are receiving this because you are subscribed to this thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/vim/vim/pull/6993#issuecomment-696321586>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ACY5DGCZMFGVEWBRHTTDDLDSG6SC5ANCNFSM4RT636YA>.
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google
> Groups "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to vim_dev+u...@googlegroups.com
> <mailto:vim_dev+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/6993/c696321586%40github.com
> <https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/6993/c696321586%40github.com?utm_medium=email&utm_source=footer>.


Bram Moolenaar

unread,
Sep 21, 2020, 4:48:37 PM9/21/20
to vim/vim, vim-dev ML, Comment

I do not see any reference to testdir/Make_ming.mak from any of the Makefiles in the src directory.
The src/Make_cyg_ming.mak file does not even have a "test" target.
Only src/Make_mvc.mak refers to testdir/Make_dos.mak.

Have you been using testdir/Make_ming.mak only directly?


You are receiving this because you commented.

Michael Soyka

unread,
Sep 21, 2020, 7:09:44 PM9/21/20
to vim/vim, vim-dev ML, Comment

On Mon, Sep 21, 2020 at 4:48 PM Bram Moolenaar <notifi...@github.com>
wrote:


> I do not see any reference to testdir/Make_ming.mak from any of the
> Makefiles in the src directory.
> The src/Make_cyg_ming.mak file does not even have a "test" target.
> Only src/Make_mvc.mak refers to testdir/Make_dos.mak.
>
> Have you been using testdir/Make_ming.mak only directly?
>
Yes. I "cd testdir" and then "mingw32-make -f Make_ming.mak ..." .

By the way, I've now made similar modifications to Make_dos.mak but do not
have Visual Studio.
Would you like me to push that to github as well?
If I do push it to github, do I then need to submit another pull request?

Sorry for the questions but this is my first time using github and pull
requests.

> —
> You are receiving this because you authored the thread.

> Reply to this email directly, view it on GitHub
> <https://github.com/vim/vim/pull/6993#issuecomment-696367049>, or
> unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AC76A55F6GYLZWWP2FOPEY3SG63Z3ANCNFSM4RT636YA>
> .
>


You are receiving this because you commented.

Bram Moolenaar

unread,
Sep 22, 2020, 4:34:21 AM9/22/20
to vim...@googlegroups.com, Michael Soyka

Michael Soyka wrote:

> > I do not see any reference to testdir/Make_ming.mak from any of the
> > Makefiles in the src directory.
> > The src/Make_cyg_ming.mak file does not even have a "test" target.
> > Only src/Make_mvc.mak refers to testdir/Make_dos.mak.
> >
> > Have you been using testdir/Make_ming.mak only directly?
> >
> Yes. I "cd testdir" and then "mingw32-make -f Make_ming.mak ..." .

It would be useful to add a test target in src/Make_cyg_ming.mak, then
"make test" in the src directory should work.

Perhaps one of the Github MinGW actions can be changed to use the ming
test makefile.

> By the way, I've now made similar modifications to Make_dos.mak but do not
> have Visual Studio.
> Would you like me to push that to github as well?
> If I do push it to github, do I then need to submit another pull request?
>
> Sorry for the questions but this is my first time using github and pull
> requests.

I'm not sure if we want to change Make_dos.mak. It's working find as it
is, changing the handling of line endings can only break it.

--
Eye have a spelling checker, it came with my PC;
It plainly marks four my revue mistakes I cannot sea.
I've run this poem threw it, I'm sure your please to no,
It's letter perfect in it's weigh, my checker tolled me sew!

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Michael Soyka

unread,
Sep 22, 2020, 10:27:32 AM9/22/20
to vim...@googlegroups.com
On 09/22/2020 4:34 AM, Bram Moolenaar wrote:
> Michael Soyka wrote:
>
>>> I do not see any reference to testdir/Make_ming.mak from any of the
>>> Makefiles in the src directory.
>>> The src/Make_cyg_ming.mak file does not even have a "test" target.
>>> Only src/Make_mvc.mak refers to testdir/Make_dos.mak.
>>>
>>> Have you been using testdir/Make_ming.mak only directly?
>>>
>> Yes. I "cd testdir" and then "mingw32-make -f Make_ming.mak ..." .
> It would be useful to add a test target in src/Make_cyg_ming.mak, then
> "make test" in the src directory should work.
I can add another commit that does that.
> Perhaps one of the Github MinGW actions can be changed to use the ming
> test makefile.
At the present time, I have no idea how to do that.  Perhaps another
could do it or provide some guidance to me so I could do it.
> By the way, I've now made similar modifications to Make_dos.mak but do not
> have Visual Studio.
> Would you like me to push that to github as well?
> If I do push it to github, do I then need to submit another pull request?
>
> Sorry for the questions but this is my first time using github and pull
> requests.
> I'm not sure if we want to change Make_dos.mak. It's working find as it
> is, changing the handling of line endings can only break it.

Since my last post I've downloaded Visual Studio and successfully run
"tinytests" with nmake and my Make_dos.mak changes against vim with tiny
features.  In my opinion, the changes work and apparently do no harm. 
Your call.

I suppose one other consideration is that these are old style tests
which may ultimately be upgraded to the new style, in which case, this
whole effort will have a short life.

-mike

Bram Moolenaar

unread,
Sep 22, 2020, 2:34:33 PM9/22/20
to vim...@googlegroups.com, Michael Soyka
As mentioned, different users build in different ways. Unless we are
solving an actual problem, I think we can just keep it as-is.

> I suppose one other consideration is that these are old style tests
> which may ultimately be upgraded to the new style, in which case, this
> whole effort will have a short life.

What is left now is a minimal set of tests that are used to test Vim
built without the +eval feature. The intention is that they will stay.

--
FIRST VILLAGER: We have found a witch. May we burn her?
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

Michael Soyka

unread,
Dec 9, 2020, 1:36:09 PM12/9/20
to vim/vim, vim-dev ML, Comment

Closed #6993.


You are receiving this because you commented.

Michael Soyka

unread,
Dec 9, 2020, 1:43:06 PM12/9/20
to vim/vim, vim-dev ML, Comment

The tests and test procedure are not broken and so changes are not needed.


You are receiving this because you commented.

Reply all
Reply to author
Forward
0 new messages