Bug 254458 - Patch for eswt junit test to adapt to different platforms
Summary: Patch for eswt junit test to adapt to different platforms
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: ERCP (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows Mobile 5.0
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: ercp.eswt CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2008-11-06 10:06 EST by Sam Lo CLA
Modified: 2021-07-15 12:17 EDT (History)
5 users (show)

See Also:


Attachments
Patch file for eSWT core junit test (16.82 KB, patch)
2008-11-06 10:06 EST, Sam Lo CLA
no flags Details | Diff
Patch file for eSWT expanded junit test (10.23 KB, patch)
2008-11-06 10:08 EST, Sam Lo CLA
no flags Details | Diff
Patch file for eSWT mobile junit test (2.75 KB, patch)
2008-11-06 10:10 EST, Sam Lo CLA
no flags Details | Diff
Patch file for eSWT core junit test - Add newly support platforms adoption and modify the framework to pass the error which should be ignored (17.19 KB, patch)
2008-11-23 23:35 EST, Sam Lo CLA
no flags Details | Diff
Patch file for eSWT expanded junit test - Add newly support platforms adoption judgement (11.86 KB, patch)
2008-11-23 23:36 EST, Sam Lo CLA
no flags Details | Diff
Patch file for eSWT mobile junit test - Add newly support platforms adoption judgement (16.83 KB, patch)
2008-11-23 23:37 EST, Sam Lo CLA
no flags Details | Diff
New project file for expanded Junit test specific on win32 platform (32.64 KB, application/x-rar-compressed)
2008-11-23 23:40 EST, Sam Lo CLA
no flags Details
New project file for expanded Junit test specific on wince platform (32.87 KB, application/x-rar-compressed)
2008-11-23 23:40 EST, Sam Lo CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Lo CLA 2008-11-06 10:06:27 EST
Created attachment 117201 [details]
Patch file for eSWT core junit test

Build ID: eswt junit test

Steps To Reproduce:
1.Please see my created patch file for core, expanded and mobile junit test
2.
3.


More information:
Comment 1 Sam Lo CLA 2008-11-06 10:08:34 EST
Created attachment 117202 [details]
Patch file for eSWT expanded junit test
Comment 2 Sam Lo CLA 2008-11-06 10:10:19 EST
Created attachment 117204 [details]
Patch file for eSWT mobile junit test
Comment 3 Sam Lo CLA 2008-11-06 10:15:48 EST
Eric Hsu will fix this problem.
Comment 4 Eric Hsu CLA 2008-11-06 10:35:49 EST
Change to eRCP-> eSWT
Comment 5 Gorkem Ercan CLA 2008-11-06 12:44:27 EST
I had a quick look at the patches I do not think we should accept some of these patches. They will cause a compilation breaks for all other platforms since Platform.isWin32(), Platform.isWinCE(), Platform.isWindowMobile(), Platform.isSmartPhone() are a platform specific methods that does not exist on other platforms. 

We had similar problems with the platform specific behavior in the past and we came up with a way to override the tests with platform specific ones. I would recommend looking at the Series80 specific tests in CVS.
Comment 6 Sam Lo CLA 2008-11-07 01:42:01 EST
Dear Gorkem,
Thanks for your kind comment. I just checkout the org.eclipse.ercp.swt.core.tests.series80 and i found that it only add Font_s80.suite(),Display_s80.suite(),List_s80.suite(),Shell_s80.suite(),Slider_s80.suite(),Text_s80.suite() and FileDialog_s80.suite() into the Alltest() of AllTest.java. I am curious about if it would like to run remaining test suite in org.eclipse.ercp.swt.core.tests. How to run it? My initial assumption is that we first still use org.eclipse.ercp.swt.core.tests to run and it will redirect to Font_s80.suite() when it is about to run Font.suite(). But I can not find any clue in source code to  bind it. So this assumption might be wrong. Please instruct me. Thanks for your help and have a nice day! ^^  
Comment 7 Petru Motrescu CLA 2008-11-17 15:38:40 EST
In S80 this is how the platform specific test cases are run:
- classes containing the specific tests are copied into org.eclipse.ercp.swt.core.tests.series80
- these copied classes are stripped down to contain just the specific test cases. Example: Test_org_eclipse_swt_graphics_Font_s80.java was copied from Test_org_eclipse_swt_graphics_Font.java and it contains only one test case: test_getFontData() which is a variation of the original test_getFontData().
- the specific test cases are listed in junit-opt-core-nokiaseries80.properties to make them pass in the original suite.
Example: org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_graphics_Font>>test_getFontData=y
- the S80 specific suites are then run together with the original suites.
Example: org.eclipse.ercp.swt.core.tests.junit.Test_org_eclipse_swt_graphics_Font.suite(); org.eclipse.ercp.swt.core.tests.series80.Test_org_eclipse_swt_graphics_Font_s80.suite()

Comment 8 Sam Lo CLA 2008-11-23 23:35:52 EST
Created attachment 118556 [details]
Patch file for eSWT core junit test - Add newly support platforms adoption and modify the framework to pass the error which should be ignored
Comment 9 Sam Lo CLA 2008-11-23 23:36:58 EST
Created attachment 118557 [details]
Patch file for eSWT expanded junit test - Add newly support platforms adoption judgement
Comment 10 Sam Lo CLA 2008-11-23 23:37:55 EST
Created attachment 118558 [details]
Patch file for eSWT mobile junit test - Add newly support platforms adoption judgement
Comment 11 Sam Lo CLA 2008-11-23 23:40:19 EST
Created attachment 118559 [details]
New project file for expanded Junit test specific on win32 platform
Comment 12 Sam Lo CLA 2008-11-23 23:40:49 EST
Created attachment 118560 [details]
New project file for expanded Junit test specific on wince platform
Comment 13 Eric Hsu CLA 2008-12-08 21:54:11 EST
Hi...Gorkem
We've updated junit test codes for WM implementation with those patches in CVS. It should have no impact on Nokia, but could you verify it again in Nokia side?
Thanks a lot.