CheckModuleAPI.java (ef39d40d) | CheckModuleAPI.java (a3415cde) |
---|---|
1/************************************************************** | 1/************************************************************** |
2 * | 2 * |
3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at | 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at |
10 * | 10 * |
11 * http://www.apache.org/licenses/LICENSE-2.0 | 11 * http://www.apache.org/licenses/LICENSE-2.0 |
12 * | 12 * |
13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. | 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. |
19 * | 19 * |
20 *************************************************************/ 21 22 | 20 *************************************************************/ 21 22 |
23 |
|
23/** complex tests to check the UNO-API 24 **/ 25package complex.unoapi; 26 27// imports 28import base.java_complex; 29import complexlib.ComplexTestCase; 30import helper.OfficeProvider; --- 10 unchanged lines hidden (view full) --- 41import java.util.Iterator; 42import java.util.Set; 43import share.DescEntry; 44import util.PropertyName; 45import util.utils; 46 47/** 48 * This Complex Test will test the UNO-API by calling dmake in <B>$MODULE</B>/qa/unoapi<p> | 24/** complex tests to check the UNO-API 25 **/ 26package complex.unoapi; 27 28// imports 29import base.java_complex; 30import complexlib.ComplexTestCase; 31import helper.OfficeProvider; --- 10 unchanged lines hidden (view full) --- 42import java.util.Iterator; 43import java.util.Set; 44import share.DescEntry; 45import util.PropertyName; 46import util.utils; 47 48/** 49 * This Complex Test will test the UNO-API by calling dmake in <B>$MODULE</B>/qa/unoapi<p> |
49 * This test depends on some requirments: | 50 * This test depends on some requirements: |
50 * The <B>TestJob</B> is <b>-o complex.unoapi.CheckModuleAPI::module(<CODE>MODULE</CODE>)</b><p> where <CODE>MODULE</CODE> 51 * could be the following:<p> 52 * <ul> 53 * <li><b>all</b> iterates over <CODE>SRC_ROOT</CODE> and call <CODE>dmake</CODE> in all qa/unoapi folder</li><p> 54 * <li><b>$module</b> call dmake in $module/qa/unoapi folder</li><p> 55 * <li><b>$module1,$module2,...</b> call dmake in $module1/qa/unoapi folder then in $module2/qa/unoapi folder and so on</li><p> 56 * </ul><p> 57 * --- 9 unchanged lines hidden (view full) --- 67 private static String mSRC_ROOT = null; 68 private static boolean mIsInitialized = false; 69 private final static boolean mContinue = true; 70 private static boolean mDebug = false; 71 private static BuildEnvTools bet = null; 72 73 /** 74 * Initialize the test environment. | 51 * The <B>TestJob</B> is <b>-o complex.unoapi.CheckModuleAPI::module(<CODE>MODULE</CODE>)</b><p> where <CODE>MODULE</CODE> 52 * could be the following:<p> 53 * <ul> 54 * <li><b>all</b> iterates over <CODE>SRC_ROOT</CODE> and call <CODE>dmake</CODE> in all qa/unoapi folder</li><p> 55 * <li><b>$module</b> call dmake in $module/qa/unoapi folder</li><p> 56 * <li><b>$module1,$module2,...</b> call dmake in $module1/qa/unoapi folder then in $module2/qa/unoapi folder and so on</li><p> 57 * </ul><p> 58 * --- 9 unchanged lines hidden (view full) --- 68 private static String mSRC_ROOT = null; 69 private static boolean mIsInitialized = false; 70 private final static boolean mContinue = true; 71 private static boolean mDebug = false; 72 private static BuildEnvTools bet = null; 73 74 /** 75 * Initialize the test environment. |
75 * This method checks for all neccesarry parameter and exit if not all parameter are set. 76 * 77 * Further this method starts an office instance and gets the office some more time to start. This is because 78 * some freshly installed offices don not have such a user tree. The office will create it on its first start, | 76 * This method checks for all necessary parameter and exit if not all parameter are set. 77 * 78 * Further this method starts an office instance and gets the office some more time to start. This is because 79 * some freshly installed offices don not have such a user tree. The office will create it on its first start, |
79 * but this will take some time. | 80 * but this will take some time. |
80 * Note: This funktionality is only reasonable with parameter <CODE>-noOffice true</CODE> | 81 * Note: This functionality is only reasonable with parameter <CODE>-noOffice true</CODE> |
81 */ 82 public void before() 83 { 84 85 if (!mIsInitialized) 86 { 87 mIsInitialized = true; 88 --- 317 unchanged lines hidden (view full) --- 406// sUnoapi = moduleTree[0].getAbsolutePath() + sep + "qa" + sep + "unoapi"; 407// } 408// } 409 String sUnoapi = getQaUnoApiPath(mSRC_ROOT, module); 410 return sUnoapi; 411 } 412 413 /** | 82 */ 83 public void before() 84 { 85 86 if (!mIsInitialized) 87 { 88 mIsInitialized = true; 89 --- 317 unchanged lines hidden (view full) --- 407// sUnoapi = moduleTree[0].getAbsolutePath() + sep + "qa" + sep + "unoapi"; 408// } 409// } 410 String sUnoapi = getQaUnoApiPath(mSRC_ROOT, module); 411 return sUnoapi; 412 } 413 414 /** |
414 Some modules contains more the one project. This methods translates given project paramater to the 415 * correspind module name. 416 * | 415 Some modules contain more than one project. This method translates given project parameter to the 416 * corresponding module name. 417 * |
417 * fwk -> framework 418 * fwl -> framework 419 * sch -> chart2 420 * lnn -> lingu 421 * lng -> linguistic 422 * sfx -> sfx2 423 * sm -> starmath 424 */ --- 5 unchanged lines hidden (view full) --- 430 aModuleHashMap.put("fwk", "framework"); 431 aModuleHashMap.put("fwl", "framework"); 432 aModuleHashMap.put("sch", "chart2"); 433 aModuleHashMap.put("lnn", "lingu"); 434 aModuleHashMap.put("lng", "linguistic"); 435 aModuleHashMap.put("sfx", "sfx2"); 436 aModuleHashMap.put("sm", "starmath"); 437 | 418 * fwk -> framework 419 * fwl -> framework 420 * sch -> chart2 421 * lnn -> lingu 422 * lng -> linguistic 423 * sfx -> sfx2 424 * sm -> starmath 425 */ --- 5 unchanged lines hidden (view full) --- 431 aModuleHashMap.put("fwk", "framework"); 432 aModuleHashMap.put("fwl", "framework"); 433 aModuleHashMap.put("sch", "chart2"); 434 aModuleHashMap.put("lnn", "lingu"); 435 aModuleHashMap.put("lng", "linguistic"); 436 aModuleHashMap.put("sfx", "sfx2"); 437 aModuleHashMap.put("sm", "starmath"); 438 |
438 // it could the that the parameter looks like "fwk,fwl". This results in double "famework,framework". | 439 // it could the that the parameter looks like "fwk,fwl". This results in double "framework,framework". |
439 // The following loop correct this to only one "framework" 440 441 final Set keys = aModuleHashMap.keySet(); 442 final Iterator iterator = keys.iterator(); 443 while (iterator.hasNext()) 444 { 445 446 final String key = (String) iterator.next(); --- 73 unchanged lines hidden (view full) --- 520 521 final String[] names = (String[]) moduleNames.toArray(new String[0]); 522 return names; 523 } 524 525 /** 526 * This function generates a list of modules to test and call <CODE>checkModule</CODE> for every module. 527 * <p> | 440 // The following loop correct this to only one "framework" 441 442 final Set keys = aModuleHashMap.keySet(); 443 final Iterator iterator = keys.iterator(); 444 while (iterator.hasNext()) 445 { 446 447 final String key = (String) iterator.next(); --- 73 unchanged lines hidden (view full) --- 521 522 final String[] names = (String[]) moduleNames.toArray(new String[0]); 523 return names; 524 } 525 526 /** 527 * This function generates a list of modules to test and call <CODE>checkModule</CODE> for every module. 528 * <p> |
528 * 529 * @param module names to test. This could be | 529 * 530 * @param module names to test. This could be |
530 * <ul> 531 * <li>a comma separated list of modules like 'sw,sc,sd'</li> 532 * <li>'all' to test all modules </li> 533 * <li>'auto' to check only modules which are added to the ChildWorkSpace</li> 534 * </ul> 535 */ 536 public void module(String module) 537 { 538 539 String[] checkModules; 540 final ComplexDescGetter desc = new ComplexDescGetter(); 541 DescEntry entry = null; 542 module = module.trim(); 543 | 531 * <ul> 532 * <li>a comma separated list of modules like 'sw,sc,sd'</li> 533 * <li>'all' to test all modules </li> 534 * <li>'auto' to check only modules which are added to the ChildWorkSpace</li> 535 * </ul> 536 */ 537 public void module(String module) 538 { 539 540 String[] checkModules; 541 final ComplexDescGetter desc = new ComplexDescGetter(); 542 DescEntry entry = null; 543 module = module.trim(); 544 |
544 /* | 545 /* |
545 all: check all modules which contains a qa/unoapi folder 546 auto: check all modules which contains a qa/unoapi folder except the module is not added 547 */ 548 if (module.equals("all")) 549 { 550 checkModules = getAllModuleCommand(); 551 } 552 else if (module.equals("auto")) --- 96 unchanged lines hidden --- | 546 all: check all modules which contains a qa/unoapi folder 547 auto: check all modules which contains a qa/unoapi folder except the module is not added 548 */ 549 if (module.equals("all")) 550 { 551 checkModules = getAllModuleCommand(); 552 } 553 else if (module.equals("auto")) --- 96 unchanged lines hidden --- |