mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

el_kaboing
21.40.2006 315aeca776d85723bc67702e1dd08d60249e9b6b
First commits for the the Windows version of the Integration Tests.
2 files added
3 files modified
97 ■■■■■ changed files
opends/tests/integration-tests-testng/build.bat 6 ●●●● patch | view | raw | blame | history
opends/tests/integration-tests-testng/build.sh 2 ●●● patch | view | raw | blame | history
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/quickstart/QuickstartAddTests.java 17 ●●●●● patch | view | raw | blame | history
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/quickstart/checklogdir.bat 31 ●●●●● patch | view | raw | blame | history
opends/tests/integration-tests-testng/test.bat 41 ●●●●● patch | view | raw | blame | history
opends/tests/integration-tests-testng/build.bat
@@ -44,9 +44,9 @@
:runAnt
rem Append the testng jar file to the existing classpath
set SEMICOLON=
if not "%CLASSPATH%" == "" set SEMICOLON=";"
set CLASSPATH=%CLASSPATH%%SEMICOLON%%TESTNG_HOME%\lib\testng-4.7-jdk15.jar
rem set SEMICOLON=
rem if not "%CLASSPATH%" == "" set SEMICOLON=";"
rem set CLASSPATH=%CLASSPATH%%SEMICOLON%%TESTNG_HOME%\lib\testng-4.7-jdk15.jar
rem echo a quick summary of what this script did
echo using the following variables:
echo   ANT_HOME=%ANT_HOME%
opends/tests/integration-tests-testng/build.sh
@@ -100,7 +100,7 @@
echo "Starting the build for the integration test suites"
# Execute the ant script and pass it any additional command-line arguments.
${ANT_HOME}/bin/ant --noconfig ${*}
${ANT_HOME}/bin/ant -verbose --noconfig ${*}
if [ $? -eq 0 ]; then
    echo "Successfully built the integration test suite"
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/quickstart/QuickstartAddTests.java
@@ -46,10 +46,27 @@
    System.out.println("*********************************************");
    System.out.println("QuickstartAdd test 1");
    String osName = new String(System.getProperty("os.name"));
    if (osName.indexOf("Windows") >= 0)  // For Windows
    {
      String exec_cmd = "CMD /C " + integration_test_home + "\\quickstart\\checklogdir " + logDir;
      Runtime rtime = Runtime.getRuntime();
      Process child = rtime.exec(exec_cmd);
      child.waitFor();
    }
    else  // all other unix systems
    {
    String exec_cmd = integration_test_home + "/quickstart/checklogdir.sh " + logDir;
    Runtime rtime = Runtime.getRuntime();
    Process child = rtime.exec(exec_cmd);
    child.waitFor();
    }
    ds_output.redirectOutput(logDir, "QuickstartAdd1.txt");
    System.out.println("Operating system is " + osName.toString());
    System.out.println(logDir + " exists and is ready to receive log files.");
    ds_output.resetOutput();
    compareExitCode(0, 0);
  }
opends/tests/integration-tests-testng/src/server/org/opends/server/integration/quickstart/checklogdir.bat
New file
@@ -0,0 +1,31 @@
@echo off
rem CDDL HEADER START
rem
rem The contents of this file are subject to the terms of the
rem Common Development and Distribution License, Version 1.0 only
rem (the "License").  You may not use this file except in compliance
rem with the License.
rem
rem You can obtain a copy of the license at
rem trunk/opends/resource/legal-notices/OpenDS.LICENSE
rem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
rem See the License for the specific language governing permissions
rem and limitations under the License.
rem
rem When distributing Covered Code, include this CDDL HEADER in each
rem file and include the License file at
rem trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
rem add the following below this CDDL HEADER, with the fields enclosed
rem information:
rem      Portions Copyright [yyyy] [name of copyright owner]
rem
rem CDDL HEADER END
rem
rem
rem      Portions Copyright 2006 Sun Microsystems, Inc.
set LOGDIR=%1
IF NOT EXIST %LOGDIR% mkdir %LOGDIR%
opends/tests/integration-tests-testng/test.bat
New file
@@ -0,0 +1,41 @@
@echo off
rem CDDL HEADER START
rem
rem The contents of this file are subject to the terms of the
rem Common Development and Distribution License, Version 1.0 only
rem (the "License").  You may not use this file except in compliance
rem with the License.
rem
rem You can obtain a copy of the license at
rem trunk/opends/resource/legal-notices/OpenDS.LICENSE
rem or https://OpenDS.dev.java.net/OpenDS.LICENSE.
rem See the License for the specific language governing permissions
rem and limitations under the License.
rem
rem When distributing Covered Code, include this CDDL HEADER in each
rem file and include the License file at
rem trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
rem add the following below this CDDL HEADER, with the fields enclosed
rem information:
rem      Portions Copyright [yyyy] [name of copyright owner]
rem
rem CDDL HEADER END
rem
rem
rem      Portions Copyright 2006 Sun Microsystems, Inc.
set INTEG_TEST_HOME=%1
if "%INTEG_TEST_HOME%" == "" goto usage
rem echo INTEG_TEST_HOME is %INTEG_TEST_HOME%
echo OpenDS Integration Tests have started.........
java -ea org.testng.TestNG -d /tmp/testng -listener org.opends.server.OpenDSTestListener %INTEG_TEST_HOME%/ext/testng/testng.xml
goto end
:usage
echo usage:
echo test [Integration Test Suite HOME Directory]
:end