Recent

Author Topic: "TestAll" project issues  (Read 6701 times)

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #15 on: January 15, 2023, 02:22:27 pm »
Just Zip the TestAll project and upload it here. :)
I will do that Juha but I want to get things working using GitLab because at some stage I will have to start using Gitlab to contribute. I have also started to study the testall code in depth and now I realize all it actually tests are the mouse functions mostly but the full code is IMHO  a very useful resource so I will keep digging and learning and hopefully zip an upload here but may not be any time soon.

The other thing is I used a credit card and verified my identity in Gitlab but now it tells me prepcache has failed. Please see attached screenshot. Sigh... I suppose drop kicking Gitlab in the head is out of the question eh? %)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: "TestAll" project issues
« Reply #16 on: January 30, 2023, 07:00:22 pm »
Sorry I failed to notice your post earlier.

The other thing is I used a credit card and verified my identity in Gitlab but now it tells me prepcache has failed. Please see attached screenshot. Sigh... I suppose drop kicking Gitlab in the head is out of the question eh? %)
Do you mean you paid something for the account? You don't need to. A free account is enough for these FOSS projects.
I also feel uncomfortable with the GitHub and GitLab interfaces and server branches because I have not practiced much.
For you it would be much easier to skip all that and contribute with patches. They are still fully supported as I wrote earlier. Create local feature branches and switch between them. Sometimes rebase against "main". When a feature or fix is ready, create a patch and upload it to bug tracker or somewhere. Easy!

You can continue studying and improving the TestAll project also after it gets added to Lazarus sources. Release early, release often. FOSS development.
« Last Edit: January 30, 2023, 07:04:48 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #17 on: February 01, 2023, 10:51:52 am »
Just Zip the TestAll project and upload it here. :)
Hello @Juha I have attached a testall.zip.  Please see if you can get this back into the main trunk when you have time. Thank you.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #18 on: February 01, 2023, 11:00:16 am »
Sorry I failed to notice your post earlier.
No worries..

Do you mean you paid something for the account? You don't need to. A free account is enough for these FOSS projects.
No no just used it to verify I am who I say I am nothing was paid.

I also feel uncomfortable with the GitHub and GitLab interfaces and server branches because I have not practiced much.
For you it would be much easier to skip all that and contribute with patches. They are still fully supported as I wrote earlier. Create local feature branches and switch between them. Sometimes rebase against "main". When a feature or fix is ready, create a patch and upload it to bug tracker or somewhere. Easy!

You can continue studying and improving the TestAll project also after it gets added to Lazarus sources. Release early, release often. FOSS development.
I have sent in a testall.zip and once you get it added back to the Lazarus sources I will start improving it. The testall.zip has all the original files with no changes. I think what you have said will be much easier than trying to get things working with Gitlab. So I will do what you asked me to and try to send in patches  :)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: "TestAll" project issues
« Reply #19 on: February 04, 2023, 12:46:01 pm »
Hello @Juha I have attached a testall.zip.  Please see if you can get this back into the main trunk when you have time. Thank you.
I placed it in lcl/tests/testall/ and tried to compile. I got :
 Error: Can't open resource file "/home/juha/SW/lazarus/lcl/tests/testall/../images/components_images.res"

I have sent in a testall.zip and once you get it added back to the Lazarus sources I will start improving it. The testall.zip has all the original files with no changes. I think what you have said will be much easier than trying to get things working with Gitlab. So I will do what you asked me to and try to send in patches
I thought you fixed some issues for Linux, but adding the original files is perfectly OK, too.

Yes, when you work with local feature branches and patches, you don't need to create a fork in GitLab. Just clone the official repo like everybody else and then work locally.
I do the same thing basically. I happen to have commit rights and thus I do "git push" instead of uploading a patch somewhere.
I have many feature branches here. Most of them are experimental and will never be used for the official repository.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #20 on: February 04, 2023, 02:37:24 pm »
Hello @Juha I have attached a testall.zip.  Please see if you can get this back into the main trunk when you have time. Thank you.
I placed it in lcl/tests/testall/ and tried to compile. I got :
 Error: Can't open resource file "/home/juha/SW/lazarus/lcl/tests/testall/../images/components_images.res"
This error is due to a path issue because we moved the files into a new location lcl/tests/testall. Instead of one level we have to now go up three levels so Lazarus can find the *.res files. Fix is shown below. The file is testallform.pp and line numbers are 171 and 172. 

Original code below that causes error.
Code: Pascal  [Select][+][-]
  1. {$R ../images/laz_images.res}
  2. {$R ../images/components_images.res}

The fix is below.
Code: Pascal  [Select][+][-]
  1. {$R ../../../images/laz_images.res}
  2. {$R ../../../images/components_images.res}

I have sent in a testall.zip and once you get it added back to the Lazarus sources I will start improving it. The testall.zip has all the original files with no changes. I think what you have said will be much easier than trying to get things working with Gitlab. So I will do what you asked me to and try to send in patches
I thought you fixed some issues for Linux, but adding the original files is perfectly OK, too.
Yes I did but then I thought let us just start from scratch the way it was. I did a git shortlog examples/testallform.pp in branch fixes_2_2 and I think attribution is important and I have no idea once we add the files I sent to lcl/tests/testall if the git history of who did what and when will remain intact? See below..

Code: Bash  [Select][+][-]
  1. aruna@debian:/media/aruna/linux-next/lazarus$ git shortlog examples/testallform.pp
  2. bart (6):
  3.       Examples: Fix resource loading in TestAll project.
  4.       Examples: Start completely rewrting the TestAll apllication.
  5.       Examples: TestAll: add a test (work in progress).
  6.       Examples: TestAll: - make dummy procedures for all tests and call them in the menu's onclick event - fix typo - refactor - cleanup
  7.      Examples: TestAll: more component tests.
  8.      Examples: TestAll: don't write an extra '$' in front of Key when logging Key events.
  9.  
  10. joost (1):
  11.       general: Updated address of the Free Software Foundation in copyright messages
  12.  
  13. juha (3):
  14.       LCL (mostly), Replace Assert(False... with //DebugLn(...  Now Assert can be used for its original purpose again.
  15.       IDE etc.: unify 3 dots in GUI string to have a space ( ...).
  16.       Examples: Fix compilation when function wrappers in FileUtil are disabled (define NoLazUTF8Wrappers). Clean uses sections.
  17.  
  18. laurent (1):
  19.       IDE: rename the images to avoid overload
  20.  
  21. lazarus (11):
  22.       + added "testall" demo provided by <christer.t.johansson@se.abb.com> stoppok
  23.       +Rebuilt from beginning to V0.2 +Prepared for non existent components (total 60 components). (Changes by Christer, commited by stoppok)
  24.       * Fixed crash caused by missing pixmaps * using resources now instead of xpm file
  25.       * enhanced testdialog for TBevel * basic test for TPaintBox stoppok
  26.       MG: minor fixes
  27.       TPanel implemented. Basic graphic primitives split into GraphType package, so that we can reference it from interface (GTK, Win32) units. New Frame3d canvas method that uses native (themed) drawing (GTK only). New overloaded Canvas.TextRect method. LCLLinux and Graphics was split, so a bunch of files had to be modified.
  28.       + Enhanced testall-app with demo for TPanel, stoppok
  29.       MG: updated licenses
  30.       MG: TNoteBook now starts with no Page and TPage has no auto names
  31.       MG: fixed compiling examples
  32.       MG: added interfaces unit
  33.  
  34. marc (1):
  35.       * Fixed compilation and some memleaks
  36.  
  37. martin (1):
  38.       Examples: Fix testallform for fpc2.3.1 (issue #14184)
  39.  
  40. mattias (7):
  41.       fixed testall example
  42.       renamed LCLLinux to LCLIntf
  43.       fixed testall
  44. bart (6):
  45.       Examples: Fix resource loading in TestAll project.
  46.       Examples: Start completely rewrting the TestAll apllication.
  47.       Examples: TestAll: add a test (work in progress).
  48.       Examples: TestAll: - make dummy procedures for all tests and call them in the menu's onclick event - fix typo - refactor - cleanup
  49.      Examples: TestAll: more component tests.
  50.      Examples: TestAll: don't write an extra '$' in front of Key when logging Key events.
  51.  
  52. joost (1):
  53.       general: Updated address of the Free Software Foundation in copyright messages
  54.  
  55. juha (3):
  56.       LCL (mostly), Replace Assert(False... with //DebugLn(...  Now Assert can be used for its original purpose again.
  57.       IDE etc.: unify 3 dots in GUI string to have a space ( ...).
  58.       Examples: Fix compilation when function wrappers in FileUtil are disabled (define NoLazUTF8Wrappers). Clean uses sections.
  59.  
  60. laurent (1):
  61.       IDE: rename the images to avoid overload
  62.  
  63. lazarus (11):
  64.       + added "testall" demo provided by <christer.t.johansson@se.abb.com> stoppok
  65.       +Rebuilt from beginning to V0.2 +Prepared for non existent components (total 60 components). (Changes by Christer, commited by stoppok)
  66.       * Fixed crash caused by missing pixmaps * using resources now instead of xpm file
  67.       * enhanced testdialog for TBevel * basic test for TPaintBox stoppok
  68.       MG: minor fixes
  69.       TPanel implemented. Basic graphic primitives split into GraphType package, so that we can reference it from interface (GTK, Win32) units. New Frame3d canvas method that uses native (themed) drawing (GTK only). New overloaded Canvas.TextRect method. LCLLinux and Graphics was split, so a bunch of files had to b
  70. bart (6):
  71.       Examples: Fix resource loading in TestAll project.
  72.       Examples: Start completely rewrting the TestAll apllication.
  73.       Examples: TestAll: add a test (work in progress).
  74.       Examples: TestAll: - make dummy procedures for all tests and call them in the menu's onclick event - fix typo - refactor - cleanup
  75.      Examples: TestAll: more component tests.
  76.      Examples: TestAll: don't write an extra '$' in front of Key when logging Key events.
  77.  
  78. joost (1):
  79.       general: Updated address of the Free Software Foundation in copyright messages
  80.  
  81. juha (3):
  82.       LCL (mostly), Replace Assert(False... with //DebugLn(...  Now Assert can be used for its original purpose again.
  83.       IDE etc.: unify 3 dots in GUI string to have a space ( ...).
  84.       Examples: Fix compilation when function wrappers in FileUtil are disabled (define NoLazUTF8Wrappers). Clean uses sections.
  85.  
  86. laurent (1):
  87.       IDE: rename the images to avoid overload
  88.  
  89. lazarus (11):
  90.       + added "testall" demo provided by <christer.t.johansson@se.abb.com> stoppok
  91.       +Rebuilt from beginning to V0.2 +Prepared for non existent components (total 60 components). (Changes by Christer, commited by stoppok)
  92.       * Fixed crash caused by missing pixmaps * using resources now instead of xpm file
  93.       * enhanced testdialog for TBevel * basic test for TPaintBox stoppok
  94. aruna@debian:/media/aruna/linux-next/lazarus$
  95.  
  96.  
  I feel it is important to keep this info but I do not know how we are going to do this if we just plug the files into lcl/tests/testall? Or as usual I am not seeing the obvious?

Yes, when you work with local feature branches and patches, you don't need to create a fork in GitLab. Just clone the official repo like everybody else and then work locally.
I do the same thing basically. I happen to have commit rights and thus I do "git push" instead of uploading a patch somewhere.
I have many feature branches here. Most of them are experimental and will never be used for the official repository.
I stopped trying to get Gitlab to work it is simply too time-consuming and frustrating. Your way is very much simpler and hopefully will work for me. Thank you.
« Last Edit: February 04, 2023, 02:45:31 pm by Aruna »

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: "TestAll" project issues
« Reply #21 on: February 04, 2023, 06:11:35 pm »
This error is due to a path issue because we moved the files into a new location lcl/tests/testall. Instead of one level we have to now go up three levels so Lazarus can find the *.res files.
Yes, it was easy to fix.

Quote
Yes I did but then I thought let us just start from scratch the way it was. I did a git shortlog examples/testallform.pp in branch fixes_2_2 and I think attribution is important and I have no idea once we add the files I sent to lcl/tests/testall if the git history of who did what and when will remain intact?
It will remain intact in "main" and in "fixes_2_2". Nothing will change the existing history.
Anyway the TestAll project should be copied from "main" branch before its deletion from examples directory, thus including all changes. Is this version from there?

Quote
I feel it is important to keep this info but I do not know how we are going to do this if we just plug the files into lcl/tests/testall? Or as usual I am not seeing the obvious?
The version in lcl/tests/ will have its own commit history once we start committing code.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #22 on: February 04, 2023, 06:43:37 pm »
Anyway the TestAll project should be copied from "main" branch before its deletion from the examples directory, thus including all changes. Is this version from there?
As it is right now in "main" branch if you check for testall by running ls -alh examples/test* there is nothing. Testall was removed at some point from "main" but it is still there under branch "fixes_2_2" and I copied it from branch "fixes_2_2". I vaguely remember asking where is "testall" and @dbannon pointed me in the right direction by saying I can find it under branch "fixes_2_2" but it is most definitely no longer in branch "main".
 

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: "TestAll" project issues
« Reply #23 on: February 05, 2023, 12:39:26 am »
As it is right now in "main" branch if you check for testall by running ls -alh examples/test* there is nothing. Testall was removed at some point from "main" but it is still there under branch "fixes_2_2" and I copied it from branch "fixes_2_2". I vaguely remember asking where is "testall" and @dbannon pointed me in the right direction by saying I can find it under branch "fixes_2_2" but it is most definitely no longer in branch "main".
It got bugfixes in "main" branch before it was removed. Thus you must go to the last commit before the removal and copy it. I even explained it in some earlier post in detail.
« Last Edit: February 05, 2023, 09:01:15 am by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #24 on: February 05, 2023, 12:43:17 pm »
It got bugfixes in "main" branch before it was removed. Thus you must go to the last commit before the removal and copy it. I even explained it in some earlier post in detail.

I ran git log -S TestAllForm and got what is below..
Code: Bash  [Select][+][-]
  1. commit 31328882fb8d3acace2ea1e906073c7c429fb146
  2. Author: Juha <juha@lazarus-ide.org>
  3. Date:   Sat Mar 5 16:51:45 2022 +0200
  4.  
  5.     Example projects tested, categorised, metadata added, restructured by David Bannon.
  6.  
  7. commit 95ca76e85edc433d7d03f14daf28aafbcd92fa36
  8. Author: mattias <nc-gaertnma@netcologne.de>
  9. Date:   Sat Oct 1 00:38:04 2005 +0000
  10.  
  11.     added .lpi for examples
  12.    
  13.     git-svn-id: trunk@7869 -
  14.  
  15. commit 09138261ffe900180e59df2d3c0ab21345d2c926
  16. Author: lazarus <lazarus@lazarus-ide.org>
  17. Date:   Tue Oct 29 08:22:33 2002 +0000
  18.  
  19.     MG: added interfaces unit
  20.    
  21.     git-svn-id: trunk@3578 -
  22.  
  23. commit 6c9464c470122f2f48889e91d031da545fbd9b4c
  24. Author: lazarus <lazarus@lazarus-ide.org>
  25. Date:   Fri May 10 06:57:51 2002 +0000
  26.  
  27.     MG: updated licenses
  28.    
  29.     git-svn-id: trunk@1668 -
  30. aruna@debian:/media/aruna/linux-next/lazarus$
  31.  

So I am guessing the commit I must go back to is commit 95ca76e85edc433d7d03f14daf28aafbcd92fa36 Author: mattias <nc-gaertnma@netcologne.de> Date:   Sat Oct 1 00:38:04 2005 +0000 ?

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: "TestAll" project issues
« Reply #25 on: February 05, 2023, 01:52:03 pm »
So I am guessing the commit I must go back to is commit 95ca76e85edc433d7d03f14daf28aafbcd92fa36 Author: mattias <nc-gaertnma@netcologne.de> Date:   Sat Oct 1 00:38:04 2005 +0000 ?
Don't go so far in history. See the third post in this thread for details.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #26 on: February 05, 2023, 02:28:48 pm »
So I am guessing the commit I must go back to is commit 95ca76e85edc433d7d03f14daf28aafbcd92fa36 Author: mattias <nc-gaertnma@netcologne.de> Date:   Sat Oct 1 00:38:04 2005 +0000 ?
Don't go so far in history. See the third post in this thread for details.
Oh my goodness you told me exactly what to do but I did not understand this at that time, I do now. Thank you Juha.

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: "TestAll" project issues
« Reply #27 on: February 17, 2023, 03:36:10 pm »
I added the latest TestAll project from "main" examples/ directory to lcl/tests in c1e41c6f962c. Please test.
Why does it test only a small subset of LCL controls? The name TestAll is misleading. Can you Aruna please take a look?
Further code improvements must happen as patches or merge requests.
« Last Edit: February 17, 2023, 08:59:21 pm by JuhaManninen »
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #28 on: February 18, 2023, 10:20:58 pm »
I added the latest TestAll project from "main" examples/ directory to lcl/tests in c1e41c6f962c. Please test.
Juha thank you very much but what you added does not have the necessary git history. You can see this below.

Code: Bash  [Select][+][-]
  1. aruna@debian:/media/aruna/linux-next/lazarus$ git log lcl/tests/testall/testall.lpi
  2. commit c1e41c6f962ce308ed3d81ea50b230be49a19f0f
  3. Author: Juha <juha@lazarus-ide.org>
  4. Date:   Fri Feb 17 16:16:35 2023 +0200
  5.  
  6.     LCL: Restore TestAll project but this time in lcl/tests directory.
  7. aruna@debian:/media/aruna/linux-next/lazarus$
  8.  
I was busy with work I did not have time to fix this. I will do so soon.

Why does it test only a small subset of LCL controls? The name TestAll is misleading. Can you Aruna please take a look?
This was how I found the original source. Only 4 controls were tested the others had placeholders but someone has to write code to test. If you go through testallform_include.inc starting at line 117 you will see the reason why. Some code is below.

Code: Pascal  [Select][+][-]
  1.  taCompImplemented: Array[taComponents] of Boolean = (
  2.     True, //tacTarrow,
  3.     True, //tacTbitbtn,
  4.     True, //tacTbutton,
  5.     True, //tacTbuttonpanel,
  6.     False, //tacTcalcedit,
  7.     False, //tacTcalendar,
  8.     False, //tacTcheckbox,
  9.     False, //tacTcheckcombobox,
  10.     False, //tacTcheckgroup,
  11.     False, //tacTchecklistbox,
  12.     False, //tacTcolorbox,


 
Further code improvements must happen as patches or merge requests.
Understood and will comply. Thank you Juha.

Aruna

  • Hero Member
  • *****
  • Posts: 513
Re: "TestAll" project issues
« Reply #29 on: February 19, 2023, 03:48:09 pm »
Please disregard my concerns about the commit history in the earlier reply. I just found out about git log --follow and this shows me the history.
Code: Pascal  [Select][+][-]
  1. git log --follow ../lcl/tests/testallform.pp

I have no idea if this will work every time but it does work for me for now. Sadly I am unable to use git blame as there is no direct commit history, I am trying to figure a work around. Maybe more experienced folks can suggest ways to do so?

Why does it test only a small subset of LCL controls? The name TestAll is misleading. Can you Aruna please take a look?

I took a look using git log testallform_include.inc and the reason why is shown in line #6 given below..

Code: Text  [Select][+][-]
  1. commit 96ba7a6b4036f65806c2720da31331a29de63e1d
  2. Author: bart <9132501-flyingsheep@users.noreply.gitlab.com>
  3. Date:   Sat Mar 5 13:09:33 2016 +0000
  4.  
  5.     Examples: TestAll:
  6.     - make dummy procedures for all tests and call them in the menu's onclick event
  7.     - fix typo
  8.     - refactor
  9.     - cleanup
  10.    
  11.     git-svn-id: trunk@51826 -
« Last Edit: February 19, 2023, 04:30:45 pm by Aruna »

 

TinyPortal © 2005-2018