Skip to content

Commit 7171c5e

Browse files
committed
[I-Build] Unify 'testAll' scripts and remove unused default values
respectively enforce the presence of the corresponding variables.
1 parent 3aa5a2f commit 7171c5e

File tree

3 files changed

+50
-43
lines changed

3 files changed

+50
-43
lines changed

production/testScripts/configuration/sdk.tests/testConfigs/linux/testAll.sh

Lines changed: 8 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -11,41 +11,24 @@ echo "command line (quoted) as passed into $(basename ${0}): ${@}"
1111
# such as for jvm
1212
source localBuildProperties.shsource 2>/dev/null
1313

14-
if [[ -z "${propertyFile}" ]]
15-
then
16-
echo "expect property file as environment variable for production runs"
14+
if [[ -z "${propertyFile}" ]]; then
15+
echo "expect 'propertyFile' as environment variable for production runs"
1716
exit 1
1817
fi
19-
20-
if [[ -z "${jvm}" ]]
21-
then
22-
echo "expect jvm as environment variable for production runs"
18+
if [[ -z "${jvm}" ]]; then
19+
echo "expect 'jvm' as environment variable for production runs"
2320
exit 1
2421
fi
25-
if [[ -z "${testedPlatform}" ]]
26-
then
27-
echo "expect testedPlatform as environment variable for production runs"
22+
if [[ -z "${testedPlatform}" ]]; then
23+
echo "expect 'testedPlatform' as environment variable for production runs"
2824
exit 1
2925
fi
3026

3127
echo "PWD: $PWD"
32-
# in production tests, should already be set by runTests2.xml, so
33-
# we set to an old version here, to make obvious if not.
34-
export jvm=${jvm:-/shared/common/jdk-1.6.x86_64/jre/bin/java}
35-
3628
# production machine is x86_64, but some local setups may be 32 bit and will need to provide
3729
# this value in localBuildProperties.shsource. (
3830
eclipseArch=${eclipseArch:-x86_64}
3931

40-
# production.properties is used in production tests,
41-
# need to override on local setups to specify appropriate vm (usually same as jvm).
42-
# see bug 388269
43-
export propertyFile=${propertyFile:-platformSpecific.properties}
44-
45-
# in product tests, should be set by runTests2.xml,
46-
# so we use "vm value", "x.0" at end, to make obvious if that's not working.
47-
export testedPlatform=${testedPlatform:-linux.gtk.x86_64_x.0}
48-
4932
echo "=== properties in testAll.sh"
5033
echo " DOWNLOAD_HOST: ${DOWNLOAD_HOST}"
5134
echo " jvm in testAll: ${jvm}"
@@ -54,6 +37,8 @@ echo " propertyFile in testAll: ${propertyFile}"
5437
echo " buildId in testAll: ${buildId}"
5538
echo " testedPlatform: ${testedPlatform}"
5639
echo " ANT_OPTS: ${ANT_OPTS}"
40+
echo " contents of propertyFile:"
41+
cat ${propertyFile}
5742

5843
#execute command to run tests
5944
/bin/chmod 755 runtests.sh

production/testScripts/configuration/sdk.tests/testConfigs/macosx/testAll.sh

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,33 @@ ulimit -c unlimited
1010

1111
source localBuildProperties.shsource 2>/dev/null
1212

13+
if [[ -z "${propertyFile}" ]]; then
14+
echo "expect 'propertyFile' as environment variable for production runs"
15+
exit 1
16+
fi
17+
if [[ -z "${jvm}" ]]; then
18+
echo "expect 'jvm' as environment variable for production runs"
19+
exit 1
20+
fi
21+
if [[ -z "${testedPlatform}" ]]; then
22+
echo "expect 'testedPlatform' as environment variable for production runs"
23+
exit 1
24+
fi
25+
1326
echo "PWD: $PWD"
14-
jvm=${jvm:-/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/bin/java}
1527

1628
# production machine is x86_64, but some local setups may be 32 bit and will need to provide
1729
# this value in localBuildProperties.shsource.
1830
eclipseArch=${eclipseArch:-x86_64}
1931

20-
# vm.properties is used by default on production machines, but will
21-
# need to override on local setups to specify appropriate vm (usually same as jvm).
22-
# see bug 388269
23-
propertyFile=${propertyFile:-vm.properties}
24-
25-
echo "jvm in testAll: ${jvm}"
26-
echo "extdir in testAll (if any): ${extdir}"
27-
echo "propertyFile in testAll: ${propertyFile}"
32+
echo "=== properties in testAll.sh"
33+
echo " DOWNLOAD_HOST: ${DOWNLOAD_HOST}"
34+
echo " jvm in testAll: ${jvm}"
35+
echo " extdir in testAll (if any): ${extdir}"
36+
echo " propertyFile in testAll: ${propertyFile}"
37+
echo " buildId in testAll: ${buildId}"
38+
echo " testedPlatform: ${testedPlatform}"
39+
echo " ANT_OPTS: ${ANT_OPTS}"
2840
echo "contents of propertyFile:"
2941
cat ${propertyFile}
3042

production/testScripts/configuration/sdk.tests/testConfigs/windows/testAll.bat

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,30 @@ REM so they could redefine jvm to what's appropriate to their machine and setup.
1111
IF EXIST localTestsProperties.bat CALL localTestsProperties.bat
1212

1313

14-
REM vm.properties is used by default on production machines, but will
15-
REM need to override on local setups and performance tests
16-
IF NOT DEFINED propertyFile SET propertyFile=vm.properties
17-
18-
REM TODO: not sure it is good to put VM here? Is there a good default here; such as "java"?
19-
REM currently, in practice, we sometimes set in Hudson scripts.
20-
REM https://bugs.eclipse.org/bugs/show_bug.cgi?id=390286
21-
IF NOT DEFINED jvm SET jvm=c:\Program Files\Java\jdk1.7.0_80\jre\bin\java.exe
14+
IF NOT DEFINED propertyFile (
15+
echo expect 'propertyFile' as environment variable for production runs
16+
exit 1
17+
)
18+
IF NOT DEFINED jvm (
19+
echo expect 'jvm' as environment variable for production runs
20+
exit 1
21+
)
22+
IF NOT DEFINED testedPlatform (
23+
echo expect 'testedPlatform' as environment variable for production runs
24+
exit 1
25+
)
2226

2327
IF NOT DEFINED eclipseArch SET eclipseArch=x86_64
2428

25-
ECHO jvm in testAll.bat: %jvm%
26-
ECHO extdir in testAll.bat (if any): %extdir%
27-
ECHO propertyFile in testAll.bat: %propertyFile%
29+
@echo on
30+
ECHO === properties in testAll.bat
31+
ECHO DOWNLOAD_HOST: %DOWNLOAD_HOST%
32+
ECHO jvm in testAll: %jvm%
33+
ECHO extdir in testAll (if any): %extdir%
34+
ECHO propertyFile in testAll: %propertyFile%
35+
ECHO buildId in testAll: %buildId%
36+
ECHO testedPlatform: %testedPlatform%
37+
ECHO ANT_OPTS: %ANT_OPTS%
2838

2939
mkdir results\consolelogs
3040

0 commit comments

Comments
 (0)