From 29cb0192d9905f00eb06ed8dd28efcdf7bdab7f4 Mon Sep 17 00:00:00 2001 From: david_williams <david_williams> Date: Thu, 5 Aug 2010 03:00:09 +0000 Subject: [PATCH] tweeks to tests --- .../scripts/dependency/build.xml | 54 +++++++++++-------- .../scripts/dependency/template.xml | 31 +++++++++++ 2 files changed, 63 insertions(+), 22 deletions(-) diff --git a/releng.wtpbuilder/scripts/dependency/build.xml b/releng.wtpbuilder/scripts/dependency/build.xml index df70378a0..38c6a95bf 100644 --- a/releng.wtpbuilder/scripts/dependency/build.xml +++ b/releng.wtpbuilder/scripts/dependency/build.xml @@ -228,27 +228,37 @@ --> </target> - <target name="installRepo"> - <!-- - We first unzip the repo, then use p2 directory app to install into the eclispe used - for testing. - --> - <!-- - We use the exec method for unzip, so we won't fail if a - prereq can not be unzipped for some reason. See - https://bugs.eclipse.org/bugs/show_bug.cgi?id=283968 - --> - <echo message="install repo for groupId: ${groupId}" /> - <mkdir dir="${testroot}/repos/${groupId}" /> - <exec dir="." executable="unzip"> - <arg line="-o -qq ${local.cache.dir}/${dependency.file} -d ${testroot}/repos/${groupId}" /> - </exec> - <!-- - <unzip - dest="${install.destination}" - src="${local.cache.dir}/${dependency.file}" - overwrite="true" /> - --> - </target> + <target name="installRepo"> + <dirname file="${ant.file}" property="dependency.dir" /> + + <copy tofile="${buildDirectory}/dependency.${groupId}.xml"> + <fileset dir="${dependency.dir}"> + <include name="template.xml" /> + </fileset> + </copy> + <replace file="${buildDirectory}/dependency.${groupId}.xml" value="${groupId}."> + <replacetoken>@dependencyGroupId@</replacetoken> + </replace> + <replace file="${buildDirectory}/dependency.${groupId}.xml" value="${dependency.dir}"> + <replacetoken>@dependencyDir@</replacetoken> + </replace> + <replace file="${buildDirectory}/dependency.${groupId}.xml" value="${dependency.properties}"> + <replacetoken>@dependencyProperties@</replacetoken> + </replace> + <ant antfile="${buildDirectory}/dependency.${groupId}.xml" target="installRepo"> + <property name="install.destination" value="${install.destination}" /> + </ant> + + <!-- + <delete failonerror="false"> + <fileset dir="."> + <include name="${buildDirectory}/dependency.${groupId}.xml" /> + </fileset> + </delete> + --> + </target> + + + </project> diff --git a/releng.wtpbuilder/scripts/dependency/template.xml b/releng.wtpbuilder/scripts/dependency/template.xml index 8223fd6be..419067480 100644 --- a/releng.wtpbuilder/scripts/dependency/template.xml +++ b/releng.wtpbuilder/scripts/dependency/template.xml @@ -206,6 +206,37 @@ </echo> </target> + <target name="installRepo"> + <!-- + We first unzip the repo, then use p2 directory app to install into the eclispe used + for testing. + --> + <!-- + We use the exec method for unzip, so we won't fail if a + prereq can not be unzipped for some reason. See + https://bugs.eclipse.org/bugs/show_bug.cgi?id=283968 + --> + <echo message="install repo for groupId: ${groupId}" /> + + <mkdir dir="${testRoot}/repos/${groupId}" /> + <exec dir="." executable="unzip"> + <arg line="-o -qq ${local.cache.dir}/${dependency.file} -d ${testRoot}/repos/${groupId}" /> + </exec> + <!-- + <unzip + dest="${install.destination}" + src="${local.cache.dir}/${dependency.file}" + overwrite="true" /> + --> + + + + + + + </target> + + <target name="cleanInstall" if="clean"> -- GitLab